1
0
mirror of https://github.com/pirate/ArchiveBox.git synced 2025-08-22 06:03:23 +02:00

ensure DOM HTML dump is non-zero length file when retrying

This commit is contained in:
Nick Sweeting
2023-03-13 10:49:26 +00:00
parent f94e8cd9b2
commit 9599845b56

View File

@@ -26,7 +26,8 @@ def should_save_dom(link: Link, out_dir: Optional[Path]=None, overwrite: Optiona
out_dir = out_dir or Path(link.link_dir) out_dir = out_dir or Path(link.link_dir)
if not overwrite and (out_dir / 'output.html').exists(): if not overwrite and (out_dir / 'output.html').exists():
return False if (out_dir / 'output.html').stat().st_size > 1:
return False
return SAVE_DOM return SAVE_DOM