fixed logic error that caused roots of NTFS drives to return as not NTFS

This commit is contained in:
Brennen Raimer
2019-05-25 11:29:06 -04:00
parent 76d1121206
commit fdf8e7d0a2

View File

@@ -28,7 +28,9 @@ class Location_Validator(QtGui.QValidator):
Arguments: Arguments:
location {str} -- A string representing a folder path location {str} -- A string representing a folder path
""" """
match = [drive for drive in psutil.disk_partitions(all = True) if (Path(drive.mountpoint) in Path(location).parents and drive.fstype.lower() == "ntfs")] match = [drive for drive in psutil.disk_partitions(all = True)
if (Path(drive.mountpoint) in Path(location).parents or Path(drive.mountpoint) == Path(location))
and drive.fstype.lower() == "ntfs"]
if match: if match:
self._ntfs_location_selected = True self._ntfs_location_selected = True
return True return True