Catch exception when parsing filesystem (#29)

* Catch exception when parsing filesystem
This commit is contained in:
Jason 2022-01-07 17:52:59 +11:00 committed by GitHub
parent fd2122cf20
commit cfcd7624f7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -178,9 +178,12 @@ class FileEntryScanner(volume_scanner.VolumeScanner):
'files (inum, filename, part)', self._rows)
self._rows = []
try:
for sub_file_entry in file_entry.sub_file_entries:
self._list_file_entry(
file_system, sub_file_entry, path_segments, location)
except (OSError, dfvfs_errors.AccessError, dfvfs_errors.BackEndError) as e:
log.warning('Unable to list file entries: {0!s}'.format(e))
def get_volume_extents(self, image_path):
"""Gets the extents of all volumes.