From 8024aede679f0d1b13d253826edf8635a20fd48e Mon Sep 17 00:00:00 2001 From: Andrew Fasano Date: Tue, 2 Jul 2024 12:35:49 -0400 Subject: [PATCH] feat(processing): Support configurable carve suffix --- unblob/processing.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/unblob/processing.py b/unblob/processing.py index 393807842d..bc542989e6 100644 --- a/unblob/processing.py +++ b/unblob/processing.py @@ -95,6 +95,7 @@ class ExtractionConfig: process_num: int = DEFAULT_PROCESS_NUM keep_extracted_chunks: bool = False extract_suffix: str = "_extract" + carve_suffix: str = "_extract" handlers: Handlers = BUILTIN_HANDLERS dir_handlers: DirectoryHandlers = BUILTIN_DIR_HANDLERS verbose: int = 1 @@ -579,7 +580,7 @@ def _extract_chunk(self, file, chunk: ValidChunk): # noqa: C901 carved_path = None else: inpath = carve_valid_chunk(self.carve_dir, file, chunk) - extract_dir = self.carve_dir / (inpath.name + self.config.extract_suffix) + extract_dir = self.carve_dir / (inpath.name + self.config.carve_suffix) carved_path = inpath if extract_dir.exists():