From 47cd9868cad0b9bac93dcdc704b4b02681d2dfaa Mon Sep 17 00:00:00 2001 From: LemonNexus Date: Wed, 11 Feb 2026 20:50:01 +0000 Subject: [PATCH] fix: ensure output directory exists before saving PNG files --- icon_extractor.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/icon_extractor.py b/icon_extractor.py index b9a495e..771e906 100644 --- a/icon_extractor.py +++ b/icon_extractor.py @@ -106,6 +106,9 @@ class TGAConverter: if output_name is None: output_name = tga_path.stem + # Ensure output directory exists before saving + self.output_dir.mkdir(parents=True, exist_ok=True) + output_path = self.output_dir / f"{output_name}.png" image.save(output_path, 'PNG')