mirror of
https://github.com/derrod/legendary.git
synced 2024-12-22 17:55:27 +00:00
[utils] Fix case-insensitive path searcher
This commit is contained in:
parent
b30de01cc7
commit
557724339d
|
@ -52,11 +52,11 @@ def case_insensitive_path_search(path):
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
# once we stop finding parts break
|
# once we stop finding parts break
|
||||||
still_remaining = remaining_parts[idx-1:]
|
still_remaining = remaining_parts[idx:]
|
||||||
break
|
break
|
||||||
|
|
||||||
logger.debug(f'New longest path: {longest_path}')
|
logger.debug(f'New longest path: {longest_path}')
|
||||||
logger.debug(f'Still unresolved: {still_remaining}')
|
logger.debug(f'Still unresolved: {still_remaining}')
|
||||||
final_path = os.path.join(*longest_path, *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)
|
return os.path.realpath(final_path)
|
||||||
|
|
Loading…
Reference in a new issue