forked from qt-creator/qt-creator
Fix: Make sure umask is used when creating new files
When a new file was created from the file menu, the permissions on *nix was always 0600 regardless of the proess' current umask. Fixed by letting CorePlugin::initialize() initialize the umask in Utils::SaveFile. Since getting the system's umask is not thread safe this can't be done directly in SaveFile::open. Task-number: QTCREATORBUG-6513 Change-Id: I10d8b2f4ab85574ed3004b5e646664c2255196b9 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
7fcc52bf47
commit
f556e8f5f2
@@ -49,10 +49,13 @@ public:
|
||||
|
||||
void setBackup(bool backup) { m_backup = backup; }
|
||||
|
||||
static void initializeUmask();
|
||||
|
||||
private:
|
||||
const QString m_finalFileName;
|
||||
bool m_finalized;
|
||||
bool m_backup;
|
||||
static QFile::Permissions m_umask;
|
||||
};
|
||||
|
||||
} // namespace Utils
|
||||
|
||||
Reference in New Issue
Block a user