{
// 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();
if (fileStr.contains(".jar")
|| fileStr.contains(".zip") || fileStr.contains(".jvp"))
{
// possibly a Jalview archive (but check further)
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"))