From 557724339d2b965e692fb4da5c2a6c3567f3dfc9 Mon Sep 17 00:00:00 2001 From: derrod Date: Wed, 5 Jan 2022 15:42:27 +0100 Subject: [PATCH] [utils] Fix case-insensitive path searcher --- legendary/utils/wine_helpers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/legendary/utils/wine_helpers.py b/legendary/utils/wine_helpers.py index 550ddf8..06d253a 100644 --- a/legendary/utils/wine_helpers.py +++ b/legendary/utils/wine_helpers.py @@ -52,11 +52,11 @@ def case_insensitive_path_search(path): break else: # once we stop finding parts break - still_remaining = remaining_parts[idx-1:] + still_remaining = remaining_parts[idx:] break logger.debug(f'New longest path: {longest_path}') logger.debug(f'Still unresolved: {still_remaining}') final_path = os.path.join(*longest_path, *still_remaining) - logger.debug('Final path:', final_path) + logger.debug(f'Final path: {final_path}') return os.path.realpath(final_path)