Fix a crash in DarkFolder when files exist with similar prefixes to the folders

This commit is contained in:
Aaron C. de Bruyn
2024-03-10 12:55:03 -07:00
parent 82132c52c8
commit 90d4e3157b
+3 -2
View File
@@ -44,8 +44,9 @@ def get_existing_folder_numbers_matching_prefix(prefix):
prefix_matches = glob.glob(get_full_path(prefix) + "*")
used = []
for m in prefix_matches:
used.append(int(m.replace(get_full_path(prefix), "")))
used.sort()
if os.path.isdir(m):
used.append(int(m.replace(get_full_path(prefix), "")))
used.sort()
return used