| Summary: | File mode always set to 0600 when saving changes | ||
|---|---|---|---|
| Product: | [Applications] kompare | Reporter: | John Baldwin <jhb> |
| Component: | general | Assignee: | Kompare bugs <kompare-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | lst_manage, n-kde, terry |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Arch Linux | ||
| OS: | Linux | ||
| Latest Commit: | https://invent.kde.org/sdk/libkomparediff2/commit/99b1d14756279c6cb3cb4df6027585130d17205e | Version Fixed/Implemented In: | 21.07.90 |
| Sentry Crash Report: | |||
| Attachments: | libkomparediff2 patch to set file permisions on copy | ||
|
Description
John Baldwin
2018-12-19 20:05:05 UTC
I have the same critical issue. - Arch Linux - KDE / Kompare 19.04 Created attachment 124765 [details]
libkomparediff2 patch to set file permisions on copy
This is a patch that sets the file permissions on file_copy to be the same as the original file. 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 ?
Forgot to say, this patch is to the libkomparediff2-19.04.3 library that kompare uses. > 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.) Hi Kevin, no I don't have git write permissions. Feel free to push it if you think it is valid (I have very little knowledge on how the KDE KIO system works). Terry Any progress on this bug? Here we are in Fedore 32 and this is still a serious inconvenience. How can we find out where this issue is in KDE priorities? Another year has past… Is there any progress on this bug? Git commit 99b1d14756279c6cb3cb4df6027585130d17205e by Kevin Kofler. Committed on 21/07/2021 at 10:16. Pushed by kkofler into branch 'release/21.08'. Set correct file mode when saving changes (#402363) src/komparemodellist.cpp (KompareModelList::saveDestination): Get permissions of existing file and copy temporary file with the same permissions. Patch by Terry Barnaby. FIXED-IN: 21.07.90 M +9 -1 src/komparemodellist.cpp https://invent.kde.org/sdk/libkomparediff2/commit/99b1d14756279c6cb3cb4df6027585130d17205e |