mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 12:54:40 +01:00
remove double slashes
This commit is contained in:
parent
e9e6c68523
commit
02ed6cb9e0
1 changed files with 5 additions and 0 deletions
|
|
@ -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
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue