This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-compress.git


The following commit(s) were added to refs/heads/master by this push:
     new 4064044ab Lister does not use correct detected format.
4064044ab is described below

commit 4064044ab5e693b5aa3c60d395aa855a5b8e0ede
Author: Gary Gregory <[email protected]>
AuthorDate: Thu Feb 1 08:13:11 2024 -0500

    Lister does not use correct detected format.
---
 src/main/java/org/apache/commons/compress/archivers/Lister.java | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/apache/commons/compress/archivers/Lister.java 
b/src/main/java/org/apache/commons/compress/archivers/Lister.java
index f16de9714..667e58b03 100644
--- a/src/main/java/org/apache/commons/compress/archivers/Lister.java
+++ b/src/main/java/org/apache/commons/compress/archivers/Lister.java
@@ -123,14 +123,15 @@ public final class Lister {
             System.err.println(file + " doesn't exist or is a directory");
         }
         final String format = (args.length > 1 ? args[1] : 
detectFormat(file)).toLowerCase(Locale.ROOT);
+        println("Detected format " + format);
         switch (format) {
         case ArchiveStreamFactory.SEVEN_Z:
             list7z(file);
             break;
-        case "zipfile":
+        case ArchiveStreamFactory.ZIP:
             listZipUsingZipFile(file);
             break;
-        case "tarfile":
+        case ArchiveStreamFactory.TAR:
             listZipUsingTarFile(file);
             break;
         default:

Reply via email to