Skip to content
  • Chinmoy Pradhan's avatar
    Obey umask rules when saving new file · c5592689
    Chinmoy Pradhan authored and Albert Astals Cid's avatar Albert Astals Cid committed
    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
    
    Reviewers: #okular, aacid
    
    Tags: #okular
    
    Differential Revision: https://phabricator.kde.org/D12049
    c5592689