mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-30 06:49:24 +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))
|
'[defaults to %s]' % os.path.join(os.curdir, default))
|
||||||
if not dir:
|
if not dir:
|
||||||
dir = default
|
dir = default
|
||||||
|
if '~' in dir:
|
||||||
|
if 'HOME' in os.environ:
|
||||||
|
dir = dir.replace('~', os.getenv('HOME'))
|
||||||
dir = os.path.abspath(dir)
|
dir = os.path.abspath(dir)
|
||||||
try:
|
try:
|
||||||
os.makedirs(dir)
|
os.makedirs(dir)
|
||||||
|
Loading…
Reference in New Issue
Block a user