OSDN Git Service

Add zip as a supported uncompress method
authorjruesga <jorge@ruesga.com>
Thu, 18 Oct 2012 23:03:11 +0000 (01:03 +0200)
committerjruesga <jorge@ruesga.com>
Thu, 18 Oct 2012 23:03:11 +0000 (01:03 +0200)
src/com/cyanogenmod/explorer/util/FileHelper.java

index aa94ce9..a377f9f 100644 (file)
@@ -699,14 +699,17 @@ public final class FileHelper {
      * @return boolean If the file is supported
      */
     @SuppressWarnings("nls")
-    public static boolean isSupportedUnCompressedFile(FileSystemObject fso) {
+    public static boolean isSupportedUncompressedFile(FileSystemObject fso) {
         // Valid uncompressed formats are:
         final String[] VALID =
                 {
                     "tar", "tgz", "tar.gz", "tar.bz2", "tar.lzma",
-                    "unzip", "gz", "bz2", "lzma", "xz", "Z"
+                    "zip", "gz", "bz2", "lzma", "xz", "Z"
                 };
 
+        // Check that have a valid file
+        if (fso == null) return false;
+
         //Only regular files
         if (isDirectory(fso) || fso instanceof Symlink) {
             return false;