fixed logic error that caused roots of NTFS drives to return as not NTFS
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user