mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-15 23:41:12 +00:00
handle fail in tmpdir creation
This commit is contained in:
@@ -102,6 +102,7 @@ def get_tmpdir():
|
||||
|
||||
def _get_tmpdir():
|
||||
"""create the tmpdir"""
|
||||
try:
|
||||
if ENV_TEMP in os.environ:
|
||||
t = os.environ[ENV_TEMP]
|
||||
t = os.path.expanduser(t)
|
||||
@@ -109,6 +110,8 @@ def _get_tmpdir():
|
||||
t = os.path.normpath(t)
|
||||
os.makedirs(t, exist_ok=True)
|
||||
return t
|
||||
except Exception:
|
||||
pass
|
||||
return tempfile.mkdtemp(prefix='dotdrop-')
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user