From: gmungoc Date: Thu, 15 Nov 2018 13:59:34 +0000 (+0000) Subject: JAL-3032 JAL-2344 project files are 'identifiable' X-Git-Tag: Release_2_11_4_0~45^2~18^2~400 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=fd0e192c04b3035061bd1651b41c45842e9c1be4;p=jalview.git JAL-3032 JAL-2344 project files are 'identifiable' --- diff --git a/src/jalview/io/FileFormat.java b/src/jalview/io/FileFormat.java index ae236c9..cb61740 100644 --- a/src/jalview/io/FileFormat.java +++ b/src/jalview/io/FileFormat.java @@ -371,7 +371,7 @@ public enum FileFormat implements FileFormatI @Override public boolean isIdentifiable() { - return false; + return true; } }; diff --git a/src/jalview/io/IdentifyFile.java b/src/jalview/io/IdentifyFile.java index 8fa76ec..ed67af8 100755 --- a/src/jalview/io/IdentifyFile.java +++ b/src/jalview/io/IdentifyFile.java @@ -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; } }