D12049: Obey umask rules when saving new file
Chinmoy Ranjan Pradhan
noreply at phabricator.kde.org
Sun Apr 8 18:04:49 UTC 2018
chinmoyr created this revision.
chinmoyr added reviewers: Okular, aacid.
Restricted Application added a project: Okular.
chinmoyr requested review of this revision.
REVISION SUMMARY
Okular saves a new file with permissions 0600 completely ignoring the umask value. This is because it
makes use of QTemporaryFile which creates file with the said permissions and which then Okular copies
to the new location.
So to overcome this generate new file permissions using old mask value and change permissions of the
new file.
BUG: 392682
TEST PLAN
Set umask to 0040
Open a pdf file from the same shell and save it under a new name.
Before patch:
file permisions -> 0600
After patch:
file permisions -> 0606
REPOSITORY
R223 Okular
BRANCH
master
REVISION DETAIL
https://phabricator.kde.org/D12049
AFFECTED FILES
part.cpp
To: chinmoyr, #okular, aacid
Cc: michaelweghorn, ngraham, aacid
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20180408/7ba0cf3a/attachment.html>
More information about the Okular-devel
mailing list