Skip to content
Snippets Groups Projects
Commit b239007e authored by Allen, Bruce (CIV)'s avatar Allen, Bruce (CIV)
Browse files

fix sorting for filenames

parent c35201f2
No related branches found
No related tags found
No related merge requests found
...@@ -34,7 +34,8 @@ def fill_examples_menu(examples_menu, path, action_function): ...@@ -34,7 +34,8 @@ def fill_examples_menu(examples_menu, path, action_function):
# add examples nestable under posix_dir_path # add examples nestable under posix_dir_path
dir_menu = examples_menu.addMenu(posix_dir_path.name) dir_menu = examples_menu.addMenu(posix_dir_path.name)
posix_paths = sorted(posix_dir_path.rglob("*.mp")) posix_paths = sorted(posix_dir_path.rglob("*.mp"),
key=lambda x: x.name.casefold())
_add_paths(posix_dir_path, posix_paths, dir_menu, action_function) _add_paths(posix_dir_path, posix_paths, dir_menu, action_function)
# add top-level examples # add top-level examples
......
...@@ -187,7 +187,7 @@ class FileMetadataTableView(QTableView): ...@@ -187,7 +187,7 @@ class FileMetadataTableView(QTableView):
def _append_library(library_path, file_metadata_list): def _append_library(library_path, file_metadata_list):
p = Path(library_path) p = Path(library_path)
posix_paths = sorted(p.rglob("*.mp")) posix_paths = sorted(p.rglob("*.mp"), key=lambda x: x.name.casefold())
if verbose(): if verbose():
print("Reading library %s count %d"%(library_path, len(posix_paths))) print("Reading library %s count %d"%(library_path, len(posix_paths)))
for posix_path in posix_paths: for posix_path in posix_paths:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment