Clarify error reporting logic in binwalk analyzer comments

This commit is contained in:
aradhyacp
2025-12-30 06:50:41 +05:30
parent 54adcbcbfa
commit a2f6579380
+2
View File
@@ -44,6 +44,8 @@ def analyze_binwalk(input_img: Path, output_dir: Path) -> None:
if extracted_dir.exists(): if extracted_dir.exists():
shutil.rmtree(extracted_dir) shutil.rmtree(extracted_dir)
# Only report error if stderr exists AND extraction failed.
# If zip_exist is True, binwalk worked (despite warnings), so we proceed.
if len(stderr) > 0 and not zip_exist: if len(stderr) > 0 and not zip_exist:
err = { err = {
"binwalk": { "binwalk": {