git://source.jalview.org
/
jalview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a90c602
)
JAL-2805 file identifying lines are turned to lowercase before matching
author
kjvdheide
<kjvanderheide@dundee.ac.uk>
Tue, 9 Jan 2018 23:08:29 +0000
(23:08 +0000)
committer
kjvdheide
<kjvanderheide@dundee.ac.uk>
Tue, 9 Jan 2018 23:08:29 +0000
(23:08 +0000)
src/jalview/io/IdentifyFile.java
patch
|
blob
|
history
diff --git
a/src/jalview/io/IdentifyFile.java
b/src/jalview/io/IdentifyFile.java
index
854a46e
..
a7ed592
100755
(executable)
--- a/
src/jalview/io/IdentifyFile.java
+++ b/
src/jalview/io/IdentifyFile.java
@@
-340,16
+340,20
@@
public class IdentifyFile
break;
}
break;
}
- else // phylogenetic file?
+ else // phylogenetic file
{
{
- if (data.startsWith("<phyloxml")
- || source.nextLine().startsWith("<phyloxml"))
+ String identifier = data.toLowerCase();
+ String secondLine = source.nextLine().toLowerCase();
+ if (identifier.startsWith("<phyloxml")
+ || secondLine.startsWith("<phyloxml"))
{
reply = FileFormat.PhyloXML;
break;
}
{
reply = FileFormat.PhyloXML;
break;
}
- else if (( ( data.startsWith( "nexus" ) ) || ( data.startsWith( "#nexus" ) )
- || ( data.startsWith( "# nexus" ) ) || ( data.startsWith( "begin" ) ) ) )
+ else if (((identifier.startsWith("nexus"))
+ || (identifier.startsWith("#nexus"))
+ || (identifier.startsWith("# nexus"))
+ || (identifier.startsWith("begin"))))
{
reply = FileFormat.Nexus;
break;
{
reply = FileFormat.Nexus;
break;