disable hardlink on windows for look publishing

This commit is contained in:
Jakub Trllo 2022-03-30 16:25:37 +02:00
parent 215da09d3d
commit 8eab6ae180
2 changed files with 9 additions and 2 deletions

View file

@ -22,4 +22,6 @@ class CreateLook(plugin.Creator):
self.data["maketx"] = self.make_tx
# Enable users to force a copy.
self.data["forceCopy"] = True
# - on Windows is "forceCopy" always changed to `True` because of
# windows implementation of hardlinks
self.data["forceCopy"] = False

View file

@ -4,6 +4,7 @@ import os
import sys
import json
import tempfile
import platform
import contextlib
import subprocess
from collections import OrderedDict
@ -334,7 +335,11 @@ class ExtractLook(openpype.api.Extractor):
transfers = []
hardlinks = []
hashes = {}
force_copy = instance.data.get("forceCopy", False)
# Temporary fix to NOT create hardlinks on windows machines
if platform.system().lower() == "windows":
force_copy = True
else:
force_copy = instance.data.get("forceCopy", False)
for filepath in files_metadata: