Create XDG_CONFIG_HOME with safe permissions
"If, when attempting to write a file, the destination directory is non-existant an attempt should be made to create it with permission 0700." https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
This commit is contained in:
parent
6f840e4b4c
commit
4362f1f372
@ -352,7 +352,7 @@ class ConfigurationGetter(object):
|
|||||||
def _getXdgConfigHome(self):
|
def _getXdgConfigHome(self):
|
||||||
path = os.getenv('XDG_CONFIG_HOME', os.path.expanduser('~/.config'))
|
path = os.getenv('XDG_CONFIG_HOME', os.path.expanduser('~/.config'))
|
||||||
if not os.path.isdir(path):
|
if not os.path.isdir(path):
|
||||||
os.mkdir(path, 0o755)
|
os.mkdir(path, 0o700)
|
||||||
return path
|
return path
|
||||||
|
|
||||||
def _parseConfigFile(self, iniPath, createConfig=True):
|
def _parseConfigFile(self, iniPath, createConfig=True):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user