mirror of
https://github.com/netinvent/npbackup.git
synced 2024-09-20 14:56:14 +08:00
Fix GUI tree on Windows must have case insensitive keys
This commit is contained in:
parent
d1d60f00fe
commit
6572aecc18
|
@ -159,6 +159,10 @@ def _make_treedata_from_json(ls_result: List[dict]) -> sg.TreeData:
|
|||
for entry in ls_result:
|
||||
# Make sure we drop the prefix '/' so sg.TreeData does not get an empty root
|
||||
entry["path"] = entry["path"].lstrip("/")
|
||||
if os.name == 'nt':
|
||||
# On windows, we need to make sure tree keys don't get duplicate because of lower/uppercase
|
||||
# Shown filenames aren't affected by this
|
||||
entry["path"] = entry["path"].lower()
|
||||
parent = os.path.dirname(entry["path"])
|
||||
|
||||
# Make sure we normalize mtime, and remove microseconds
|
||||
|
|
Loading…
Reference in a new issue