From 02ed6cb9e080a1f3f0e751dd046fe14470edb1f7 Mon Sep 17 00:00:00 2001 From: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> Date: Wed, 9 Jul 2025 16:34:33 +0200 Subject: [PATCH] remove double slashes --- client/ayon_core/host/interfaces/workfiles.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/client/ayon_core/host/interfaces/workfiles.py b/client/ayon_core/host/interfaces/workfiles.py index b6c33337e9..193d59322b 100644 --- a/client/ayon_core/host/interfaces/workfiles.py +++ b/client/ayon_core/host/interfaces/workfiles.py @@ -1113,6 +1113,11 @@ class IWorkfileHost: filepath = os.path.join(workdir, filename) rootless_path = f"{rootless_workdir}/{filename}" + # Double slashes can happen when root leads to root of disk or + # when task exists on root folder + # - '/{hierarchy}/{folder[name]}' -> '//some_folder' + while "//" in rootless_path: + rootless_path = rootless_path.replace("//", "/") workfile_entity = workfile_entities_by_path.pop( rootless_path, None )