Fix for getting volume location (#26)

* Fix for getting volume location
This commit is contained in:
Jason 2021-12-01 13:22:14 +11:00 committed by GitHub
parent 4bc951a061
commit 367dc821b0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -133,7 +133,9 @@ class FileEntryScanner(volume_scanner.VolumeScanner):
location = getattr(path_spec, 'location', None)
while path_spec.HasParent():
type_indicator = path_spec.type_indicator
if type_indicator == dfvfs_definitions.TYPE_INDICATOR_TSK_PARTITION:
if type_indicator in (dfvfs_definitions.TYPE_INDICATOR_GPT,
dfvfs_definitions.TYPE_INDICATOR_LVM,
dfvfs_definitions.TYPE_INDICATOR_TSK_PARTITION):
if location in ('\\', '/'):
location = getattr(path_spec, 'location', None)
break