repo: Add a private helper to replace a file, honoring fsync policy
Extracted from discussion in https://github.com/GNOME/ostree/pull/83
This commit is contained in:
1 parent
1892a6fe13
commit
fff8ffdd2f
3 files changed
+28
-3
No files matched your search
@@ -106,9 +106,8 @@ write_checksum_file_at (OstreeRepo *self,
|
||||
bufnl[l] = '\n';
|
||||
bufnl[l+1] = '\0';
|
||||
|
||||
if (!glnx_file_replace_contents_at (dfd, name, (guint8*)bufnl, l + 1,
|
||||
self->disable_fsync ? GLNX_FILE_REPLACE_NODATASYNC : GLNX_FILE_REPLACE_DATASYNC_NEW,
|
||||
cancellable, error))
|
||||
if (!_ostree_repo_file_replace_contents (self, dfd, name, (guint8*)bufnl, l + 1,
|
||||
cancellable, error))
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user