Author: pwang
Date: 2010-07-27 15:52:16 -0700 (Tue, 27 Jul 2010)
New Revision: 21039
Modified:
cytoscape/trunk/src/cytoscape/CytoscapeInit.java
Log:
Fixed bug: can not load session on command line on Windows
Modified: cytoscape/trunk/src/cytoscape/CytoscapeInit.java
===================================================================
--- cytoscape/trunk/src/cytoscape/CytoscapeInit.java 2010-07-27 22:50:00 UTC
(rev 21038)
+++ cytoscape/trunk/src/cytoscape/CytoscapeInit.java 2010-07-27 22:52:16 UTC
(rev 21039)
@@ -453,11 +453,17 @@
} else {
Cytoscape.setCurrentSessionFileName(sessionFile);
- final File shortName = new
File(sessionFile);
- final String absolutePath =
shortName.getAbsolutePath();
- final URL sessionURL = new
URL("file://" + absolutePath.replace("%", "%25"));
- reader = new
CytoscapeSessionReader(sessionURL);
- sessionName = shortName.getName();
+ // The following code has problem to
load session file from command line on Windows
+ // because prefix driver letter "C:\"
or "D:\\" was removed from the absolute path
+ //final File shortName = new
File(sessionFile);
+ //final String absolutePath =
shortName.getAbsolutePath();
+ //final URL sessionURL = new
URL("file://" + absolutePath.replace("%", "%25"));
+ //reader = new
CytoscapeSessionReader(sessionURL);
+ //sessionName = shortName.getName();
+
+ final File _sessionFile = new
File(sessionFile);
+ reader = new
CytoscapeSessionReader(_sessionFile.toURL());
+ sessionName = _sessionFile.getName();
}
if (reader != null) {
--
You received this message because you are subscribed to the Google Groups
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/cytoscape-cvs?hl=en.