From 9f6f1bb3a457c32faf48d0a51cebc3dc41898711 Mon Sep 17 00:00:00 2001 From: deadc0de6 Date: Wed, 15 Sep 2021 13:22:05 +0200 Subject: [PATCH] fix archive bug #13 --- catcli/decomp.py | 2 +- catcli/noder.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/catcli/decomp.py b/catcli/decomp.py index 59ad469..e7285fd 100644 --- a/catcli/decomp.py +++ b/catcli/decomp.py @@ -33,7 +33,7 @@ class Decomp: def get_names(self, path): '''get tree of compressed archive''' - ext = os.path.splitext(path)[1][1:] + ext = os.path.splitext(path)[1][1:].lower() if ext in list(self.ext.keys()): return self.ext[ext](path) return None diff --git a/catcli/noder.py b/catcli/noder.py index 4c3b72d..3b493ea 100644 --- a/catcli/noder.py +++ b/catcli/noder.py @@ -205,8 +205,11 @@ class Noder: if self.arc: ext = os.path.splitext(path)[1][1:] if ext.lower() in self.decomp.get_formats(): + self._debug('{} is an archive'.format(path)) names = self.decomp.get_names(path) self.list_to_tree(n, names) + else: + self._debug('{} is NOT an archive'.format(path)) return n def dir_node(self, name, path, parent, storagepath):