fileio: sync directory after rename, too
This commit is contained in:
parent
cbffdcecae
commit
5b3f4a20ea
|
@ -202,6 +202,13 @@ static int write_string_file_atomic(
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (FLAGS_SET(flags, WRITE_STRING_FILE_SYNC)) {
|
||||||
|
/* Sync the rename, too */
|
||||||
|
r = fsync_directory_of_file(fileno(f));
|
||||||
|
if (r < 0)
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
fail:
|
fail:
|
||||||
|
|
Loading…
Reference in a new issue