diff --git a/extractodx.py b/extractodx.py index f53f2ce..3f35a44 100644 --- a/extractodx.py +++ b/extractodx.py @@ -220,6 +220,8 @@ def extract_odx(odx_string, flash_info: constants.FlashInfo, is_dsg=False): file_data = Path(args.file).read_text() (data_blocks, allowed_boxcodes) = extract_odx(file_data, flash_info, args.dsg) + os.makedirs(args.outdir, exist_ok=True) + for data_block in data_blocks: print(data_block) with open(os.path.join(args.outdir, data_block), "wb") as dataFile: