Blob Blame History Raw
From c1008a7e0e196d7d218b5d139592fdded4ba814e Mon Sep 17 00:00:00 2001
From: Marek Kasik <mkasik@redhat.com>
Date: Wed, 19 Aug 2015 17:46:34 +0200
Subject: libdocument: Don't copy permissions from original file

Consider copy as a new file and use default permissions for it
when saving a copy of opened document.

https://bugzilla.gnome.org/show_bug.cgi?id=753019
---
 libdocument/ev-file-helpers.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libdocument/ev-file-helpers.c b/libdocument/ev-file-helpers.c
index 6691a55..59d7b1e 100644
--- a/libdocument/ev-file-helpers.c
+++ b/libdocument/ev-file-helpers.c
@@ -456,7 +456,8 @@ ev_file_copy_metadata (const char *from,
         target_file = g_file_new_for_uri (to);
 
         result = g_file_copy_attributes (source_file, target_file,
-                                         G_FILE_COPY_ALL_METADATA,
+                                         G_FILE_COPY_ALL_METADATA |
+                                         G_FILE_COPY_TARGET_DEFAULT_PERMS,
                                          NULL, error);
 
         g_object_unref (target_file);
-- 
cgit v0.11.2