Skip to content

Commit

Permalink
Merge pull request #6218 from ThomasWaldmann/better-errors-master
Browse files Browse the repository at this point in the history
if ensure_dir() fails, give more informative error message, fixes #5952
  • Loading branch information
ThomasWaldmann authored Feb 1, 2022
2 parents 444ef02 + 79964d1 commit 2b81943
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/borg/helpers/fs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 2b81943

Please sign in to comment.