Skip to content

Commit

Permalink
✅ Normalize path for case-insensitive string comparison on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
fbriol committed Feb 10, 2024
1 parent a9e4192 commit 5072f11
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions zcollection/tests/test_fs_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ def test_normalize_path() -> None:

def istrcmp(str1, str2):
"""Case insensitive string comparison."""
if platform.system() == 'Windows':
str1 = str1.replace('\\', '/')
str2 = str2.replace('\\', '/')
return str1.lower() == str2.lower()

assert istrcmp(fs_utils.normalize_path(fs, '/'), root)
Expand Down

0 comments on commit 5072f11

Please sign in to comment.