mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 17:24:32 +02:00
use symlink if possible
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user