Fix permissions when copying files
This reverts commit 7863f595, I was wrong :) Reading the code some more (in copyjob, file_copy and file_unix), the permissions arg is '-1' when we shouldn't touch the dest permissions at all, i.e. leave them as the system default permissions for newly created files (umask ...etc). The scenarios are: - calling KIO::copy() A to B, permissions are preserved by default, i.e. the job copies A's permissions to the permissions arg when it calls file_copy - calling KIO::copy() A to B, and calling setDefaultPermissions(true), the job sets the permissions arg to '-1' when it calls file_copy - calling KIO::file_copy() directly, the you have full control, if you want to preserve the permissions use A's permissions as the permissions arg, otherwise use '-1' to use the system default permissions ACL attributes are handled implicitly at the moment, which isn't ideal but can be improved later on. BUG: 404777 CCBUG: 103331 FIXED-IN: 5.87
Loading
Please register or sign in to comment