kopia lustrzana https://github.com/crahan/ipyfilechooser
Properly handle Windows case insensitive paths
rodzic
371aa501f7
commit
a2c3f52a7c
|
@ -30,6 +30,9 @@ def get_subpaths(path: str) -> List[str]:
|
|||
|
||||
def strip_parent_path(path: str, parent_path: str) -> str:
|
||||
"""Remove a parent path from a path."""
|
||||
path = os.path.normcase(path)
|
||||
parent_path = os.path.normcase(parent_path)
|
||||
|
||||
if path == parent_path:
|
||||
return os.path.sep
|
||||
elif path.startswith(parent_path):
|
||||
|
|
Ładowanie…
Reference in New Issue