4ee8dc3
From c1008a7e0e196d7d218b5d139592fdded4ba814e Mon Sep 17 00:00:00 2001
4ee8dc3
From: Marek Kasik <mkasik@redhat.com>
4ee8dc3
Date: Wed, 19 Aug 2015 17:46:34 +0200
4ee8dc3
Subject: libdocument: Don't copy permissions from original file
4ee8dc3
4ee8dc3
Consider copy as a new file and use default permissions for it
4ee8dc3
when saving a copy of opened document.
4ee8dc3
4ee8dc3
https://bugzilla.gnome.org/show_bug.cgi?id=753019
4ee8dc3
---
4ee8dc3
 libdocument/ev-file-helpers.c | 3 ++-
4ee8dc3
 1 file changed, 2 insertions(+), 1 deletion(-)
4ee8dc3
4ee8dc3
diff --git a/libdocument/ev-file-helpers.c b/libdocument/ev-file-helpers.c
4ee8dc3
index 6691a55..59d7b1e 100644
4ee8dc3
--- a/libdocument/ev-file-helpers.c
4ee8dc3
+++ b/libdocument/ev-file-helpers.c
4ee8dc3
@@ -456,7 +456,8 @@ ev_file_copy_metadata (const char *from,
4ee8dc3
         target_file = g_file_new_for_uri (to);
4ee8dc3
 
4ee8dc3
         result = g_file_copy_attributes (source_file, target_file,
4ee8dc3
-                                         G_FILE_COPY_ALL_METADATA,
4ee8dc3
+                                         G_FILE_COPY_ALL_METADATA |
4ee8dc3
+                                         G_FILE_COPY_TARGET_DEFAULT_PERMS,
4ee8dc3
                                          NULL, error);
4ee8dc3
 
4ee8dc3
         g_object_unref (target_file);
4ee8dc3
-- 
4ee8dc3
cgit v0.11.2
4ee8dc3