Check first element length, not list length

pull/62/head
Thomas Bouve 2021-09-13 23:59:39 +02:00
rodzic 80bb352294
commit 350f52fb51
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -201,7 +201,7 @@ class FileChooser(VBox, ValueWidget):
restricted_path = self._restrict_path(path)
subpaths = get_subpaths(restricted_path)
if len(os.path.splitdrive(subpaths[-1])) == 2:
if len(os.path.splitdrive(subpaths[-1])[0]) == 2:
# Add missing Windows drive letters
drives = get_drive_letters()
subpaths.extend(list(set(drives) - set(subpaths)))