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
@@ -40,6 +40,7 @@
|
||||
#include "infobar.h"
|
||||
|
||||
#include <extensionsystem/pluginmanager.h>
|
||||
#include <utils/savefile.h>
|
||||
|
||||
#include <QtPlugin>
|
||||
#include <QDebug>
|
||||
@@ -95,6 +96,10 @@ bool CorePlugin::initialize(const QStringList &arguments, QString *errorMessage)
|
||||
m_designMode = new DesignMode;
|
||||
InfoBar::initializeGloballySuppressed();
|
||||
}
|
||||
|
||||
// Make sure we respect the process's umask when creating new files
|
||||
Utils::SaveFile::initializeUmask();
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user