From 3534730006e10c280e45adaefac6e7c8846b2df5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Katharina=20Dr=C3=B6ge?= Date: Wed, 8 Apr 2026 22:38:00 +0200 Subject: [PATCH] Fastpath for existing path case "Fastpath", heh, get it, because it's working with paths... --- legendary/lfs/wine_helpers.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/legendary/lfs/wine_helpers.py b/legendary/lfs/wine_helpers.py index e884a90..ae9a55d 100644 --- a/legendary/lfs/wine_helpers.py +++ b/legendary/lfs/wine_helpers.py @@ -25,6 +25,9 @@ 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 """ + if os.path.exists(path): + return path + path_parts = os.path.normpath(path).split(os.sep) # If path_parts[0] is empty, we're on Unix and thus start searching at / if not path_parts[0]: