use symlink if possible

This commit is contained in:
Seunghoon Lee
2025-02-15 16:37:20 +09:00
parent 067512b8a3
commit 23134eba6a
+5 -2
View File
@@ -96,9 +96,12 @@ def get_blaslt_enabled() -> bool:
def link_or_copy(src: os.PathLike, dst: os.PathLike):
try:
os.link(src, dst)
os.symlink(src, dst)
except Exception:
shutil.copyfile(src, dst)
try:
os.link(src, dst)
except Exception:
shutil.copyfile(src, dst)
def make_copy() -> None: