From fd0e192c04b3035061bd1651b41c45842e9c1be4 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Thu, 15 Nov 2018 13:59:34 +0000 Subject: [PATCH] JAL-3032 JAL-2344 project files are 'identifiable' --- src/jalview/io/FileFormat.java | 2 +- src/jalview/io/IdentifyFile.java | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) 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; } } -- 1.7.10.2