diff --git a/archivebox/core/admin.py b/archivebox/core/admin.py index d8b3854d..1a80c193 100644 --- a/archivebox/core/admin.py +++ b/archivebox/core/admin.py @@ -700,18 +700,24 @@ class ArchiveResultAdmin(ABIDModelAdmin): def output_summary(self, result): snapshot_dir = Path(CONFIG.OUTPUT_DIR) / str(result.pwd).split('data/', 1)[-1] output_str = format_html( - '
{}

', + '
{}

', result.output, ) output_str += format_html('See result files ...
', str(result.snapshot.timestamp))
         path_from_output_str = (snapshot_dir / result.output)
         output_str += format_html('{}/{}

', str(snapshot_dir), str(result.output)) - if path_from_output_str.exists(): + + path_exists = False + try: + path_exists = path_from_output_str.exists() + except OSError: + pass + + if path_exists: root_dir = str(path_from_output_str) else: root_dir = str(snapshot_dir) - # print(root_dir, str(list(os.walk(root_dir)))) for root, dirs, files in os.walk(root_dir):