diff --git a/client/ayon_core/plugins/publish/integrate_hero_version.py b/client/ayon_core/plugins/publish/integrate_hero_version.py index 95b9f418f9..4fb8b886a9 100644 --- a/client/ayon_core/plugins/publish/integrate_hero_version.py +++ b/client/ayon_core/plugins/publish/integrate_hero_version.py @@ -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):