Skip to content

Commit

Permalink
fix: Do not create extra output directory, if nothing was extracted
Browse files Browse the repository at this point in the history
The output path is printed in the previous commit, so depending on the
caller having to look at well known paths is no longer needed.
  • Loading branch information
e3krisztian committed Nov 27, 2024
1 parent dfd1777 commit 2767e86
Show file tree
Hide file tree
Showing 17 changed files with 1 addition and 5 deletions.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
2 changes: 1 addition & 1 deletion tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ def test_keep_extracted_chunks(
[
pytest.param([], 5, id="skip-extension-empty"),
pytest.param([""], 5, id="skip-zip-extension-empty-suffix"),
pytest.param([".zip"], 1, id="skip-extension-zip"),
pytest.param([".zip"], 0, id="skip-extension-zip"),
pytest.param([".rlib"], 5, id="skip-extension-rlib"),
],
)
Expand Down
4 changes: 0 additions & 4 deletions unblob/processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,6 @@ def process_file(

process_result = _process_task(config, task)

if not config.skip_extraction and not carve_dir.exists():
# ensure that the root extraction directory is created even for empty extractions
extract_dir.mkdir(parents=True, exist_ok=True)

if report_file:
write_json_report(report_file, process_result)

Expand Down

0 comments on commit 2767e86

Please sign in to comment.