[ostree/wip/fsync: 4/11] deploy: Ensure that any modified config files are fsync()d
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree/wip/fsync: 4/11] deploy: Ensure that any modified config files are fsync()d
- Date: Wed, 9 Apr 2014 05:53:22 +0000 (UTC)
commit 992759557b3e6be2ef4b8d96842fda2793b77f8b
Author: Colin Walters <walters verbum org>
Date: Tue Apr 8 17:37:35 2014 -0400
deploy: Ensure that any modified config files are fsync()d
It really wouldn't do for one to be missing one's ssh keys for
example...
src/libostree/ostree-sysroot-deploy.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/libostree/ostree-sysroot-deploy.c b/src/libostree/ostree-sysroot-deploy.c
index 8af5f2c..44ad959 100644
--- a/src/libostree/ostree-sysroot-deploy.c
+++ b/src/libostree/ostree-sysroot-deploy.c
@@ -86,6 +86,11 @@ copy_modified_config_file (GFile *orig_etc,
if (!g_file_copy (src, dest, G_FILE_COPY_OVERWRITE | G_FILE_COPY_NOFOLLOW_SYMLINKS |
G_FILE_COPY_ALL_METADATA,
cancellable, NULL, NULL, error))
goto out;
+ if (g_file_info_get_file_type (src_info) == G_FILE_TYPE_REGULAR)
+ {
+ if (!gs_file_sync_data (dest, cancellable, error))
+ goto out;
+ }
}
ret = TRUE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]