Make case_insensitive_file_search a no-op on Windows (#772)

This commit is contained in:
CommandMC 2026-08-04 11:30:08 +02:00 committed by GitHub
parent eb76c9f782
commit e1f67bbbcd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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