Skip to content

Commit

Permalink
Use dirs_exist_ok=True, refs #744
Browse files Browse the repository at this point in the history
  • Loading branch information
simonw committed May 21, 2020
1 parent faea509 commit f2e0a55
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions datasette/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -602,9 +602,9 @@ def link_or_copy(src, dst):

def link_or_copy_directory(src, dst):
try:
shutil.copytree(src, dst, copy_function=os.link)
shutil.copytree(src, dst, copy_function=os.link, dirs_exist_ok=True)
except OSError:
shutil.copytree(src, dst)
shutil.copytree(src, dst, dirs_exist_ok=True)


def module_from_path(path, name):
Expand Down

0 comments on commit f2e0a55

Please sign in to comment.