Skip to content

Commit

Permalink
pass along dirs_exist_ok for local destinations
Browse files Browse the repository at this point in the history
  • Loading branch information
klwetstone committed Oct 24, 2022
1 parent f5ad57c commit 25c4ce7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cloudpathlib/cloudpath.py
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,7 @@ def copytree(
else:
ignored_names = set()

destination.mkdir(parents=True, exist_ok=True)
destination.mkdir(parents=True, exist_ok=dirs_exist_ok)

for subpath in contents:
if subpath.name in ignored_names:
Expand All @@ -826,6 +826,7 @@ def copytree(
subpath.copytree(
destination / subpath.name,
force_overwrite_to_cloud=force_overwrite_to_cloud,
dirs_exist_ok=dirs_exist_ok,
ignore=ignore,
)

Expand Down

0 comments on commit 25c4ce7

Please sign in to comment.