Update gcmtool.py

sort paths in rebuild-fst to be like originals fsts
This commit is contained in:
tmpz23 2022-01-09 19:14:52 +01:00 committed by GitHub
parent a4b65f1abc
commit d547bdca97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -360,7 +360,8 @@ class GCM:
sys_path = folder_path / "sys" sys_path = folder_path / "sys"
fst_tree = FstTree(root_path, self.__get_min_file_offset(sys_path), align=align) fst_tree = FstTree(root_path, self.__get_min_file_offset(sys_path), align=align)
for path in root_path.glob('**/*'): path_list = sorted([path for path in root_path.glob('**/*')], key=lambda s:Path(str(s).upper()))
for path in path_list:
fst_tree.add_node_by_path(path) fst_tree.add_node_by_path(path)
logging.debug(fst_tree) logging.debug(fst_tree)
fst_path = sys_path / "fst.bin" fst_path = sys_path / "fst.bin"