mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-26 05:42:15 +01:00
OP-1923 - handle back slashes in Settings
Replace only when target file exists.
This commit is contained in:
parent
565489db39
commit
b87d3e3c67
1 changed files with 6 additions and 2 deletions
|
|
@ -1823,9 +1823,11 @@ class NukeDirmap(HostDirmap):
|
|||
def dirmap_routine(self, source_path, destination_path):
|
||||
log.debug("{}: {}->{}".format(self.file_name,
|
||||
source_path, destination_path))
|
||||
source_path = source_path.lower().replace(os.sep, '/')
|
||||
destination_path = destination_path.lower().replace(os.sep, '/')
|
||||
if platform.system().lower() == "windows":
|
||||
self.file_name = self.file_name.lower().replace(
|
||||
source_path.lower(), destination_path.lower())
|
||||
source_path, destination_path)
|
||||
else:
|
||||
self.file_name = self.file_name.replace(
|
||||
source_path, destination_path)
|
||||
|
|
@ -1860,4 +1862,6 @@ def dirmap_file_name_filter(file_name):
|
|||
DirmapCache.sync_module(),
|
||||
file_name)
|
||||
dirmap_processor.process_dirmap()
|
||||
return dirmap_processor.file_name
|
||||
if os.path.exists(dirmap_processor.file_name):
|
||||
return dirmap_processor.file_name
|
||||
return file_name
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue