Ensure original_path does not end in a trailing slash which is probably what was causing the failures in the first place

This commit is contained in:
Kovid Goyal 2020-12-11 17:16:46 +05:30
parent 24ac765178
commit cc970aa694
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -63,6 +63,7 @@ def library_id_from_path(path, existing=frozenset()):
def correct_case_of_last_path_component(original_path): def correct_case_of_last_path_component(original_path):
original_path = os.path.abspath(original_path)
prefix, basename = os.path.split(original_path) prefix, basename = os.path.split(original_path)
q = basename.lower() q = basename.lower()
try: try: