https://bugs.kde.org/show_bug.cgi?id=404777

Ahmad Samir <a.samir...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|fa...@kde.org               |kio-bugs-n...@kde.org
           Priority|HI                          |NOR
           Severity|critical                    |minor
                 CC|                            |a.samir...@gmail.com,
                   |                            |fa...@kde.org

--- Comment #5 from Ahmad Samir <a.samir...@gmail.com> ---
I think the issue here is the interpretation of the docs[1]:
“By default the permissions of the copied files will be those of the source
files.

But when copying "template" files to "new" files, people prefer the umask to
apply, rather than the template's permissions. For that case, call
setDefaultPermissions(true)”

The code ends up going through FileProtocol::copy() which has:
    // set final permissions
    // if no special mode given, preserve the mode from the sourcefile
    qDebug() << "_mode" << _mode;
    if (_mode == -1) {
        _mode = buff_src.st_mode;
    }


What that means, is that if permissions are -1, which is what
setDefaultPermissions(true) does, no special permissions will be set, and the
permissions of the source are used.

I'll see if I can make the documentation more clear.

[1]
https://api.kde.org/frameworks/kio/html/classKIO_1_1CopyJob.html#a3bd4dda22a3bd50adf195542d9d009ad

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to