Skip to content

Commit 45ba6d8

Browse files
authored
Merge pull request #190 from melissawm/restore-check
Restore SameFileError check when copying notebooks
2 parents b26ee37 + a5942c3 commit 45ba6d8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

jupyterlite_sphinx/jupyterlite_sphinx.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,10 @@ def run(self):
363363
# If it is True, then they have already been copied to notebooks_dir by the
364364
# nbformat.write() function above.
365365
else:
366-
shutil.copy(notebook, notebooks_dir)
366+
try:
367+
shutil.copy(notebook, notebooks_dir)
368+
except shutil.SameFileError:
369+
pass
367370
else:
368371
notebook_name = None
369372

0 commit comments

Comments
 (0)