Fix model path breaking with commas in filenames

Fixes #332
This commit is contained in:
DominikDoom
2025-09-09 10:04:00 +02:00
parent c4510663ca
commit 89fee277e3

View File

@@ -98,9 +98,9 @@ def sort_models(model_list, sort_method = None, name_has_subpath = False):
# During merging on the JS side we need to re-sort anyway, so here only the sort criteria are calculated.
# The list itself doesn't need to get sorted at this point.
if len(model_list[0]) > 2:
results = [f'{name},"{sorter(path, name, name_has_subpath)}",{meta}' for path, name, meta in model_list]
results = [f'"{name}","{sorter(path, name, name_has_subpath)}",{meta}' for path, name, meta in model_list]
else:
results = [f'{name},"{sorter(path, name, name_has_subpath)}"' for path, name in model_list]
results = [f'"{name}","{sorter(path, name, name_has_subpath)}"' for path, name in model_list]
return results