From cee3219304697cc3852e167650b7c40e87912a95 Mon Sep 17 00:00:00 2001 From: MustafaJafar Date: Sat, 15 Feb 2025 00:49:22 +0200 Subject: [PATCH] revert using `os.scandir` inside `version_up` --- client/ayon_core/lib/path_tools.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/ayon_core/lib/path_tools.py b/client/ayon_core/lib/path_tools.py index f3c35d998b..31baac168c 100644 --- a/client/ayon_core/lib/path_tools.py +++ b/client/ayon_core/lib/path_tools.py @@ -136,8 +136,8 @@ def version_up(filepath): index += len(new_label) clash_basename = clash_basename[:index] - for f in os.scandir(dirname): - if f.name.endswith(ext) and f.name.startswith(clash_basename): + for file in os.listdir(dirname): + if file.endswith(ext) and file.startswith(clash_basename): log.info("Skipping existing version %s" % new_label) return version_up(new_filename)