[MOBY-guts] biomoby commit

Paul Gordon gordonp at dev.open-bio.org
Sat Jun 16 00:31:33 UTC 2007


gordonp
Fri Jun 15 20:31:33 EDT 2007
Update of /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/gui
In directory dev.open-bio.org:/tmp/cvs-serv29449/src/main/ca/ucalgary/seahawk/gui

Modified Files:
	MobySaveDialog.java 
Log Message:
Fixed suffix-checking logic
moby-live/Java/src/main/ca/ucalgary/seahawk/gui MobySaveDialog.java,1.3,1.4
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/gui/MobySaveDialog.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/gui/MobySaveDialog.java	2007/06/08 14:04:27	1.3
+++ /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/gui/MobySaveDialog.java	2007/06/16 00:31:33	1.4
@@ -48,15 +48,18 @@
 			File f = fileChooser.getSelectedFile();
 			String filename = f.getName();
 			javax.swing.filechooser.FileFilter filter = fileChooser.getFileFilter();
-			if(filename.indexOf(XML_EXT) == filename.length()-XML_EXT.length()){
+			if(filename.indexOf(XML_EXT) != -1 && 
+			   filename.indexOf(XML_EXT) == filename.length()-XML_EXT.length()){
 			    // ends in xml suffix
 			    exportXML(document, f);
 			}
-			else if(filename.indexOf(HTML_EXT) == filename.length()-HTML_EXT.length()){
+			else if(filename.indexOf(HTML_EXT) != -1 &&
+				filename.indexOf(HTML_EXT) == filename.length()-HTML_EXT.length()){
 			    // ends in html suffix
 			    exportHTML(document, f);
 			}
-			else if(filename.indexOf(SCUFL_EXT) == filename.length()-SCUFL_EXT.length()){
+			else if(filename.indexOf(SCUFL_EXT) != -1 &&
+				filename.indexOf(SCUFL_EXT) == filename.length()-SCUFL_EXT.length()){
 			    // ends in html suffix
 			    exportSCUFL(document, f);
 			}




More information about the MOBY-guts mailing list