X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FIdentifyFile.java;fp=src%2Fjalview%2Fio%2FIdentifyFile.java;h=e65101d9668b831656bdbe4d291d73e1bfd730e8;hb=2e9e0527943d0c42a6059ebbb8e7e69346c38206;hp=ff959b0d79b281f5bb078e500bc768e270931c93;hpb=e4843176d8337fc165c1b93ae6c161cb29521f6d;p=jalview.git diff --git a/src/jalview/io/IdentifyFile.java b/src/jalview/io/IdentifyFile.java index ff959b0..e65101d 100755 --- a/src/jalview/io/IdentifyFile.java +++ b/src/jalview/io/IdentifyFile.java @@ -127,14 +127,21 @@ public class IdentifyFile { // jar files are special - since they contain all sorts of random // characters. - if (source.inFile != null) + if (source.inFile != null || source.getDataName() != null) { - String fileStr = source.inFile.getName(); + String fileStr = source.inFile == null ? source.getDataName() + : source.inFile.getName(); // possibly a Jalview archive. if (fileStr.lastIndexOf(".jar") > -1 || fileStr.lastIndexOf(".zip") > -1) { reply = FileFormat.Jalview; + // TODO shouldn't there be a break here? + } + else if (fileStr.lastIndexOf(".bam") > -1) + { + reply = FileFormat.Bam; + break; } } if (!lineswereskipped && data.startsWith("PK"))