Skip to content

Commit

Permalink
archive: fix bug in os.makedirs() call in 'unpack_archive_multitgz' (…
Browse files Browse the repository at this point in the history
…directories may already exist).
  • Loading branch information
pjbriggs committed Feb 7, 2025
1 parent a44d438 commit 08035b4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ngsarchiver/archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -2254,7 +2254,8 @@ def unpack_archive_multitgz(archive_list, extract_dir=None,
# extracting them (workaround for setting
# default permissions)
try:
os.makedirs(os.path.join(extract_dir, o.name))
os.makedirs(os.path.join(extract_dir, o.name),
exist_ok=True)
except Exception as ex:
print(f"Exception creating directory '{o.name}' "
f"from '{a}': {ex}")
Expand Down

0 comments on commit 08035b4

Please sign in to comment.