Skip to content

Commit 09b24c8

Browse files
committed
Don't crash the export if using a file from the game install.
The previous check was insufficient, so we will simply supress the same file error when copying files.
1 parent a542418 commit 09b24c8

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

korman/exporter/outfile.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -390,8 +390,10 @@ def _write_deps(self):
390390
handle.write(i.file_data)
391391
os.utime(dst_path, times)
392392
elif i.file_path:
393-
if i.file_path != dst_path:
394-
shutil.copy2(i.file_path, str(dst_path))
393+
try:
394+
shutil.copy2(i.file_path, dst_path)
395+
except shutil.SameFileError:
396+
pass
395397
else:
396398
report.warn("No data found for dependency file '{}'. It will not be copied into the export directory.",
397399
PurePath(i.dirname, i.filename))

0 commit comments

Comments
 (0)