diff --git a/fcopy.c b/fcopy.c index 8837478..d5e4197 100644 --- a/fcopy.c +++ b/fcopy.c @@ -49,6 +49,9 @@ void zero_copy(const char *src_path, const char *dst_path) exit(1); } + // Sync to avoid dirty memory + fdatasync(dst); + close(dst); close(src); }