mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-27 21:22:39 +01:00
Added ~ handling to getDirectoryName.
This commit is contained in:
parent
df1a26900d
commit
4ccd2291df
@ -107,6 +107,9 @@ def getDirectoryName(default):
|
||||
'[defaults to %s]' % os.path.join(os.curdir, default))
|
||||
if not dir:
|
||||
dir = default
|
||||
if '~' in dir:
|
||||
if 'HOME' in os.environ:
|
||||
dir = dir.replace('~', os.getenv('HOME'))
|
||||
dir = os.path.abspath(dir)
|
||||
try:
|
||||
os.makedirs(dir)
|
||||
|
Loading…
Reference in New Issue
Block a user