mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
replace os.listdir by os.scandir
This commit is contained in:
parent
bba0df9c0e
commit
99f60e1012
1 changed files with 2 additions and 2 deletions
|
|
@ -136,8 +136,8 @@ def version_up(filepath):
|
|||
index += len(new_label)
|
||||
clash_basename = clash_basename[:index]
|
||||
|
||||
for file in os.listdir(dirname):
|
||||
if file.endswith(ext) and file.startswith(clash_basename):
|
||||
for file in os.scandir(dirname):
|
||||
if file.name.endswith(ext) and file.name.startswith(clash_basename):
|
||||
log.info("Skipping existing version %s" % new_label)
|
||||
return version_up(new_filename)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue