Skip to content

Commit

Permalink
UQBAR-90: Fix invalid cross-device link (#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
josiah-wolf-oberholtzer authored Jan 17, 2024
1 parent 9029b3c commit 0dafa78
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion uqbar/_version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__version_info__ = (0, 7, 0)
__version_info__ = (0, 7, 1)
__version__ = ".".join(str(x) for x in __version_info__)
7 changes: 6 additions & 1 deletion uqbar/graphs/graphers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import hashlib
import pathlib
import re
import shutil
import subprocess
import tempfile
from typing import Generator, Sequence, Tuple
Expand Down Expand Up @@ -107,7 +108,11 @@ def migrate_assets(
if not old_path.name.startswith(render_prefix):
continue
new_path = output_directory / old_path.name
old_path.rename(new_path)
try:
old_path.rename(new_path)
except OSError:
shutil.copy(old_path, new_path)
old_path.unlink()
migrated_assets.append(new_path)
return migrated_assets

Expand Down

0 comments on commit 0dafa78

Please sign in to comment.