refs: Use *at for writes, honor repo fsync flag
I was looking at https://bugzilla.gnome.org/show_bug.cgi?id=738954 which wants us to ensure we chown() the refs. As part of that, I did a generic conversion to use `*at()` (which naturally gives us more low level control so we can call `fchown` etc. This patch also sneaks in a change to respect the repo's `disable_fsync` flag - if fsync is not set, then we never `fdatasync()` (unlike the `g_file_replace_contents()` default. Also unlike it, if fsync is enabled, we *always* sync even if the file didn't exist.
This commit is contained in:
1 parent
c648fada30
commit
1892a6fe13
2 files changed
+52
-44
No files matched your search
+1
-1
Submodule libglnx updated: d59a63e3e6...376219a9c2.
Reference in new issue
Block a user