JAL-3032 JAL-2344 project files are 'identifiable'
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Thu, 15 Nov 2018 13:59:34 +0000 (13:59 +0000)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Thu, 15 Nov 2018 13:59:34 +0000 (13:59 +0000)
src/jalview/io/FileFormat.java
src/jalview/io/IdentifyFile.java

index ae236c9..cb61740 100644 (file)
@@ -371,7 +371,7 @@ public enum FileFormat implements FileFormatI
     @Override
     public boolean isIdentifiable()
     {
-      return false;
+      return true;
     }
   };
 
index 8fa76ec..ed67af8 100755 (executable)
@@ -165,16 +165,16 @@ public class IdentifyFile
           if (source.inFile != null)
           {
             String fileStr = source.inFile.getName();
-            // possibly a Jalview archive.
-            if (fileStr.lastIndexOf(".jar") > -1
-                    || fileStr.lastIndexOf(".zip") > -1)
+            if (fileStr.contains(".jar")
+                    || fileStr.contains(".zip") || fileStr.contains(".jvp"))
             {
+              // possibly a Jalview archive (but check further)
               reply = FileFormat.Jalview;
             }
           }
           if (!lineswereskipped && data.startsWith("PK"))
           {
-            reply = FileFormat.Jalview; // archive.
+            reply = FileFormat.Jalview; // archive
             break;
           }
         }