From 3e1db2890fdd08c8063769a4829d3ac55e8abbf1 Mon Sep 17 00:00:00 2001 From: Will Toohey Date: Sun, 17 Feb 2019 15:07:33 +1000 Subject: [PATCH] Allow --tex-only to recursively extract ifs files --- ifstools/ifs.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ifstools/ifs.py b/ifstools/ifs.py index c126211..e1ae94b 100644 --- a/ifstools/ifs.py +++ b/ifstools/ifs.py @@ -132,8 +132,6 @@ class IFS: path = self.folder_out if tex_only: kwargs['use_cache'] = False - if 'tex' not in self.tree.folders: - return utils.mkdir_silent(path) utime(path, (self.time, self.time)) @@ -158,7 +156,8 @@ class IFS: # extract the files for f in tqdm(self.tree.all_files): - if tex_only and not isinstance(f, ImageFile) and not isinstance(f, ImageCanvas): + # allow recurse + tex_only to extract ifs files + if tex_only and not isinstance(f, ImageFile) and not isinstance(f, ImageCanvas) and not (recurse and f.name.endswith('.ifs')): continue f.extract(path, **kwargs) if progress: