1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2025-02-21 13:47:16 +00:00

if ensure_dir() fails, give more informative error message, fixes #5952

previously, it just said PermissionDenied with giving the filename/path.
This commit is contained in:
Thomas Waldmann 2022-02-01 04:02:09 +01:00
parent 444ef02262
commit 79964d1a2b

View file

@ -36,7 +36,7 @@ def ensure_dir(path, mode=stat.S_IRWXU, pretty_deadly=True):
os.makedirs(path, mode=mode, exist_ok=True)
except OSError as e:
if pretty_deadly:
raise Error(e.args[1])
raise Error(str(e))
else:
raise