[kompare] [Bug 402363] File mode always set to 0600 when saving changes

Kevin Kofler bugzilla_noreply at kde.org
Sun Dec 29 11:15:22 GMT 2019


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

--- Comment #4 from Kevin Kofler <kevin.kofler at chello.at> ---
> This is a patch that sets the file permissions on file_copy to be the same as the original file.

Looks good to me. Do you have git write (push) access to the KDE repositories?
Or shall I push it?

> This may not be the correct way of doing this. I can't find any documentation
> on what the permissions = -1 argument to KIO::file_copy is actually supposed
> to do. This setting "may" have been meant to keep the files permissions
> unchanged but it seem to set them to 0600. Maybe someone who knows how KIO is
> supposed to work can answer this ?

The documentation:
https://api.kde.org/frameworks/kio/html/namespaceKIO.html#ad7e9c41cdcc6255c56dc2e32a7442995
says:
"May be -1. In this case no special permission mode is set."
which I would interpret as meaning it just uses the default umask of the
destination file system. (At most, some KIOslaves might attempt to copy the
permissions of the SOURCE file, but it definitely does not mean retaining the
permissions of an existing destination file that is being overwritten.)

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Kompare-devel mailing list