Skip to content

Commit

Permalink
Merge pull request #181 from radiocosmology/ljg/fix-mkdir
Browse files Browse the repository at this point in the history
fix(_default_asyncs): fix race condition when making new directories
  • Loading branch information
ljgray committed Jun 14, 2024
2 parents beaaf74 + b0e4a5c commit 5a624f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion alpenhorn/io/_default_asyncs.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def pull_async(
with tree_lock.up:
if not to_dir.exists():
log.info(f'Creating directory "{to_dir}".')
to_dir.mkdir(parents=True)
to_dir.mkdir(parents=True, exist_ok=True)

# If the file doesn't exist, create a placeholder so we can release
# the tree lock without having to wait for the transfer to complete
Expand Down

0 comments on commit 5a624f2

Please sign in to comment.