Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael J. Chudobiak <mjc@svn.gnome.org>2009-01-22 20:41:41 (GMT)
committer Michael J. Chudobiak <mjc@src.gnome.org>2009-01-22 20:41:41 (GMT)
commit42546653dbc467a9bc7b2c4cb0a9bcd8764c8a4b (patch)
treeb87db76d1b7fa23f6f90bc696e1fcb7c2775c87e
parent7d10821fa9ae7cde776bcefb9278ac0371212045 (diff)
When saving a file, using the default permissions for the user/system,
2009-01-22 Michael J. Chudobiak <mjc@svn.gnome.org> * libdocument/ev-file-helpers.c: (ev_xfer_uri_simple): When saving a file, using the default permissions for the user/system, respecting umask and any setgid bit on the directory. Uses the new G_FILE_COPY_TARGET_DEFAULT_PERMS flag in glib 2.19.0, if available. svn path=/trunk/; revision=3374
-rw-r--r--ChangeLog7
-rw-r--r--libdocument/ev-file-helpers.c3
2 files changed, 10 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index c3412bb..935e919 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-01-22 Michael J. Chudobiak <mjc@svn.gnome.org>
+
+ * libdocument/ev-file-helpers.c: (ev_xfer_uri_simple):
+ When saving a file, using the default permissions for the user/system,
+ respecting umask and any setgid bit on the directory. Uses the new
+ G_FILE_COPY_TARGET_DEFAULT_PERMS flag in glib 2.19.0, if available.
+
2009-01-21 Christian Persch <chpe@gnome.org>
* configure.ac:
diff --git a/libdocument/ev-file-helpers.c b/libdocument/ev-file-helpers.c
index 5998e5e..b2451ac 100644
--- a/libdocument/ev-file-helpers.c
+++ b/libdocument/ev-file-helpers.c
@@ -221,6 +221,9 @@ ev_xfer_uri_simple (const char *from,
target_file = g_file_new_for_uri (to);
result = g_file_copy (source_file, target_file,
+#if GLIB_CHECK_VERSION(2,19,0)
+ G_FILE_COPY_TARGET_DEFAULT_PERMS |
+#endif
G_FILE_COPY_OVERWRITE,
NULL, NULL, NULL, &ioerror);