OP-2813 - fix wrong merge

This commit is contained in:
Petr Kalis 2022-03-14 10:49:48 +01:00
parent 9de8504c4d
commit b46a7a5387

View file

@ -83,15 +83,14 @@ def path_from_representation(representation, anatomy):
def copy_file(src_path, dst_path):
"""Hardlink file if possible(to save space), copy if not"""
from avalon.vendor import filelink # safer importing
from openpype.lib import create_hard_link # safer importing
if os.path.exists(dst_path):
return
try:
filelink.create(
create_hard_link(
src_path,
dst_path,
filelink.HARDLINK
dst_path
)
except OSError:
shutil.copyfile(src_path, dst_path)