Skip to content

Commit

Permalink
Merge pull request #190 from melissawm/restore-check
Browse files Browse the repository at this point in the history
Restore SameFileError check when copying notebooks
  • Loading branch information
steppi authored Jul 18, 2024
2 parents b26ee37 + a5942c3 commit 45ba6d8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion jupyterlite_sphinx/jupyterlite_sphinx.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,10 @@ def run(self):
# If it is True, then they have already been copied to notebooks_dir by the
# nbformat.write() function above.
else:
shutil.copy(notebook, notebooks_dir)
try:
shutil.copy(notebook, notebooks_dir)
except shutil.SameFileError:
pass
else:
notebook_name = None

Expand Down

0 comments on commit 45ba6d8

Please sign in to comment.