From da1a39ed6ad15437b946617630f45efedf312e86 Mon Sep 17 00:00:00 2001 From: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> Date: Fri, 6 Jun 2025 17:03:25 +0200 Subject: [PATCH] validate extension earlier Co-authored-by: Roy Nieterau --- client/ayon_core/host/interfaces/workfiles.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client/ayon_core/host/interfaces/workfiles.py b/client/ayon_core/host/interfaces/workfiles.py index d5aec5b651..f6f6b91f2d 100644 --- a/client/ayon_core/host/interfaces/workfiles.py +++ b/client/ayon_core/host/interfaces/workfiles.py @@ -539,12 +539,13 @@ class IWorkfileHost: items = [] for filename in filenames: - filepath = os.path.join(workdir, filename) # TODO add 'default' support for folders - ext = os.path.splitext(filepath)[1].lower() + ext = os.path.splitext(filename)[1].lower() if ext not in extensions: continue + filepath = os.path.join(workdir, filename) + rootless_path = f"{rootless_workdir}/{filename}" workfile_entity = workfile_entities_by_path.pop( rootless_path, None