Skip to content
Permalink
Browse files

Log exception and skip searching a directory for Profiles if we don't

have access to it.
  • Loading branch information...
obsidianforensics committed Jun 20, 2019
1 parent b3bcf51 commit 31ff047bb4ea490023a10bb77a47c3b4095c3318
Showing with 8 additions and 1 deletion.
  1. +8 −1 pyhindsight/analysis.py
@@ -353,7 +353,14 @@ def is_profile(base_path, existing_files, warn=False):
def search_subdirs(self, base_path):
"""Recursively search a path for browser profiles"""
found_profile_paths = []
base_dir_listing = os.listdir(base_path)

try:
base_dir_listing = os.listdir(base_path)
except Exception, e:
log.warning('Exception reading directory {0:s}; possible permissions issue? Exception: {1:s}'
.format(base_path, e))
return found_profile_paths

if self.is_profile(base_path, base_dir_listing):
found_profile_paths.append(base_path)
for item in base_dir_listing:

0 comments on commit 31ff047

Please sign in to comment.
You can’t perform that action at this time.