From 84e77a970719618710e68bd17a9a69bdf5311442 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Mon, 16 Oct 2023 12:30:49 +0200 Subject: [PATCH 1/2] fixing unc paths on windows with backward slashes --- openpype/hosts/nuke/api/lib.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/openpype/hosts/nuke/api/lib.py b/openpype/hosts/nuke/api/lib.py index 62f3a3c3ff..b061271f5a 100644 --- a/openpype/hosts/nuke/api/lib.py +++ b/openpype/hosts/nuke/api/lib.py @@ -2222,7 +2222,6 @@ Reopening Nuke should synchronize these paths and resolve any discrepancies. """ # replace path with env var if possible ocio_path = self._replace_ocio_path_with_env_var(config_data) - ocio_path = ocio_path.replace("\\", "/") log.info("Setting OCIO config path to: `{}`".format( ocio_path)) @@ -2303,7 +2302,7 @@ Reopening Nuke should synchronize these paths and resolve any discrepancies. if env_path in path: # with regsub we make sure path format of slashes is correct resub_expr = ( - "[regsub -all {{\\\\}} [getenv {}] \"/\"]").format(env_var) + "[regsub -all {{\\}} [getenv {}] \"/\"]").format(env_var) new_path = path.replace( env_path, resub_expr From 489a502550fdf610b0afeb91a33266b32793a344 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Wed, 18 Oct 2023 12:15:18 +0200 Subject: [PATCH 2/2] reverting backslash removal --- openpype/hosts/nuke/api/lib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/hosts/nuke/api/lib.py b/openpype/hosts/nuke/api/lib.py index b061271f5a..ab0d0f4971 100644 --- a/openpype/hosts/nuke/api/lib.py +++ b/openpype/hosts/nuke/api/lib.py @@ -2302,7 +2302,7 @@ Reopening Nuke should synchronize these paths and resolve any discrepancies. if env_path in path: # with regsub we make sure path format of slashes is correct resub_expr = ( - "[regsub -all {{\\}} [getenv {}] \"/\"]").format(env_var) + "[regsub -all {{\\\\}} [getenv {}] \"/\"]").format(env_var) new_path = path.replace( env_path, resub_expr