From 6b31a703482242e6f867144e9bcdf2be21473fcd Mon Sep 17 00:00:00 2001 From: Escartem Date: Thu, 25 Jul 2024 11:27:38 +0200 Subject: [PATCH] hdiff fixes --- extract.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/extract.py b/extract.py index 478272b..2dbebd4 100644 --- a/extract.py +++ b/extract.py @@ -25,7 +25,9 @@ class WwiseExtract: self.file_structure = {"folders": {}, "files": []} files = [f for f in os.listdir(folder_path) if f.endswith(".pck")] - hdiff_files = [f for f in os.listdir(diff_path) if f.endswith(".pck.hdiff")] + hdiff_files = [] + if diff_path != "": + hdiff_files = [f for f in os.listdir(diff_path) if f.endswith(".pck.hdiff")] if len(files) == 0: return None @@ -302,5 +304,6 @@ class WwiseExtract: if self.mapper is not None: self.mapper.reset() self.allocator.free_mem() - self.hdiff_dir.cleanup() - self.hdiff_dir = None + if self.hdiff_dir is not None: + self.hdiff_dir.cleanup() + self.hdiff_dir = None