Make case_insensitive_file_search a no-op on Windows

This commit is contained in:
Katharina Dröge 2026-08-02 12:35:09 +02:00
parent eb76c9f782
commit d97687ab17
No known key found for this signature in database
GPG key ID: 3D586C5E334E5A26

View file

@ -1,6 +1,7 @@
import configparser
import logging
import os
import sys
logger = logging.getLogger('WineHelpers')
@ -23,8 +24,11 @@ def get_shell_folders(registry, wine_pfx):
def case_insensitive_file_search(path: str) -> str:
"""
Similar to case_insensitive_path_search: Finds a file case-insensitively
Note that this *does* work on Windows, although it's rather pointless
No-op on Windows
"""
if sys.platform == 'win32':
return path
if os.path.exists(path):
return path