Commit 023c175c authored by Jérémy Bobbio's avatar Jérémy Bobbio

Skip archive name in zipinfo output

parent 96f60167
......@@ -34,8 +34,10 @@ class Zipinfo(Command):
return ['zipinfo', self.path]
def filter(self, line):
# the full path appears in the output, we need to remove it
return line.replace(self.path, os.path.basename(self.path))
# we don't care about the archive file path
if re.match('^Archive:.*', line):
return ''
return line
class ZipinfoVerbose(Zipinfo):
......
@@ -1,5 +1,5 @@
-Archive: test1.zip
@@ -1,4 +1,4 @@
-Zip file size: 571 bytes, number of entries: 2
+Archive: test2.zip
+Zip file size: 714 bytes, number of entries: 2
drwxr-xr-x 3.0 unx 0 bx stor 15-Jun-24 13:44 dir/
--rw-r--r-- 3.0 unx 446 tx defN 15-Jun-24 13:44 dir/text
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment