mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Report whether it's hardlinking or copying; also report whether hardlinking failed.
This commit is contained in:
parent
67ed43a6b2
commit
0ab3653f36
1 changed files with 10 additions and 4 deletions
|
|
@ -619,12 +619,11 @@ class IntegrateHeroVersion(
|
|||
|
||||
self.log.debug("Folder already exists: \"{}\"".format(dirname))
|
||||
|
||||
self.log.debug("Copying file \"{}\" to \"{}\"".format(
|
||||
src_path, dst_path
|
||||
))
|
||||
|
||||
if self.use_hardlinks:
|
||||
# First try hardlink and copy if paths are cross drive
|
||||
self.log.debug("Hardlinking file \"{}\" to \"{}\"".format(
|
||||
src_path, dst_path
|
||||
))
|
||||
try:
|
||||
create_hard_link(src_path, dst_path)
|
||||
# Return when successful
|
||||
|
|
@ -639,6 +638,13 @@ class IntegrateHeroVersion(
|
|||
if exc.errno not in [errno.EXDEV, errno.EINVAL]:
|
||||
raise
|
||||
|
||||
self.log.debug(
|
||||
"Hardlinking failed, falling back to regular copy...")
|
||||
|
||||
self.log.debug("Copying file \"{}\" to \"{}\"".format(
|
||||
src_path, dst_path
|
||||
))
|
||||
|
||||
shutil.copy(src_path, dst_path)
|
||||
|
||||
def version_from_representations(self, project_name, repres):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue