Skip to content

file-operations: Honor umask when creating new files

Ondrej Holy requested to merge wip/oholy/umask-templates into master

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

Edited by Ondrej Holy

Merge request reports