Blob Blame History Raw
From d9c747da91f937fb9fda422615860008bb1d3b4c Mon Sep 17 00:00:00 2001
From: Marek Kasik <mkasik@redhat.com>
Date: Wed, 19 Aug 2015 17:46:34 +0200
Subject: [PATCH] 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);
-- 
2.4.3