summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOndrej Holy <oholy@redhat.com>2019-11-18 11:34:10 +0100
committerOndrej Holy <oholy@redhat.com>2020-03-06 15:01:20 +0000
commitee035fe0b4257d335687c038bf8b41a64d452d7f (patch)
tree0fdc59bc65703da8d7b5f26e8c618fa05f947ed4
parent4d7a1a7413cc7e76e99e11def90a6503cc142efb (diff)
downloadnautilus-ee035fe0b4257d335687c038bf8b41a64d452d7f.tar.gz
file-operations: Honor umask when creating new files
File creation mask should be honored when creating new files from templates as it is when creating new folders, or dragging raw data. But it is not because G_FILE_COPY_NONE flag is specified when creating new files from templates. Let's use G_FILE_COPY_TARGET_DEFAULT_PERMS flag to ensure that file creation mask is honored in this case as well. Just note that this behavior is not wanted when copying in general (although it is also honored by "cp" cmd in this case) as it might have some unexpected consequences as discussed on: https://bugzilla.gnome.org/show_bug.cgi?id=167102
-rw-r--r--src/nautilus-file-operations.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nautilus-file-operations.c b/src/nautilus-file-operations.c
index acf65f3cf..a90706e2e 100644
--- a/src/nautilus-file-operations.c
+++ b/src/nautilus-file-operations.c
@@ -7361,7 +7361,7 @@ retry:
{
res = g_file_copy (job->src,
dest,
- G_FILE_COPY_NONE,
+ G_FILE_COPY_TARGET_DEFAULT_PERMS,
common->cancellable,
NULL, NULL,
&error);