Handle OSError when creating download directory
Fixes #2570
(cherry picked from commit 7ed71592e0)
This commit is contained in:
parent
bb8901f48f
commit
4efb19dc76
|
|
@ -79,7 +79,10 @@ def download_dir():
|
|||
else:
|
||||
ddir = directory
|
||||
|
||||
os.makedirs(ddir, exist_ok=True)
|
||||
try:
|
||||
os.makedirs(ddir, exist_ok=True)
|
||||
except OSError as e:
|
||||
message.error("Failed to create download directory: {}".format(e))
|
||||
|
||||
return ddir
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue