mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-11 04:32:36 +01:00
Added ~ handling to getDirectoryName.
This commit is contained in:
parent
4ccd2291df
commit
b5c5262878
@ -107,9 +107,7 @@ 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.expanduser(dir)
|
||||
dir = os.path.abspath(dir)
|
||||
try:
|
||||
os.makedirs(dir)
|
||||
|
Loading…
Reference in New Issue
Block a user