|
From: <mwl...@us...> - 2008-02-07 21:38:49
|
Revision: 619
http://cishell.svn.sourceforge.net/cishell/?rev=619&view=rev
Author: mwlinnem
Date: 2008-02-07 13:38:27 -0800 (Thu, 07 Feb 2008)
Log Message:
-----------
Fixed code that crashed the save dialog when saving data with certain labels.
Modified Paths:
--------------
trunk/clients/gui/org.cishell.reference.gui.persistence/src/org/cishell/reference/gui/persistence/save/FileSaver.java
Modified: trunk/clients/gui/org.cishell.reference.gui.persistence/src/org/cishell/reference/gui/persistence/save/FileSaver.java
===================================================================
--- trunk/clients/gui/org.cishell.reference.gui.persistence/src/org/cishell/reference/gui/persistence/save/FileSaver.java 2008-02-07 00:15:28 UTC (rev 618)
+++ trunk/clients/gui/org.cishell.reference.gui.persistence/src/org/cishell/reference/gui/persistence/save/FileSaver.java 2008-02-07 21:38:27 UTC (rev 619)
@@ -191,7 +191,7 @@
//find the first character of the file name extension.
- int extensionBeginIndex = fileNameWithExtension.indexOf(".");
+ int extensionBeginIndex = fileNameWithExtension.lastIndexOf(".");
int endIndex;
@@ -201,7 +201,7 @@
//first period.
} else {
//we didn't find an extension on the file name.
- endIndex = fileLabel.length(); // don't cut any off the end.
+ endIndex = fileNameWithExtension.length(); // don't cut any off the end.
}
String fileNameWithoutExtension = fileNameWithExtension.substring(0, endIndex);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|