mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
OP-2813 - fix wrong merge
This commit is contained in:
parent
9de8504c4d
commit
b46a7a5387
1 changed files with 3 additions and 4 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue