remove double slashes

This commit is contained in:
Jakub Trllo 2025-07-09 16:34:33 +02:00
parent e9e6c68523
commit 02ed6cb9e0

View file

@ -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
)