Author: pwang
Date: 2010-07-28 10:02:03 -0700 (Wed, 28 Jul 2010)
New Revision: 21045

Modified:
   cytoscape/trunk/src/cytoscape/CytoscapeInit.java
Log:
Works on Win, try on Linux

Modified: cytoscape/trunk/src/cytoscape/CytoscapeInit.java
===================================================================
--- cytoscape/trunk/src/cytoscape/CytoscapeInit.java    2010-07-28 02:30:24 UTC 
(rev 21044)
+++ cytoscape/trunk/src/cytoscape/CytoscapeInit.java    2010-07-28 17:02:03 UTC 
(rev 21045)
@@ -455,15 +455,27 @@
 
                                        // 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);
+                                       final File shortName = new 
File(sessionFile);
+                                       final String absolutePath = 
shortName.getAbsolutePath();
+                                       
+                                       
+                                       System.out.println("absolutePath = 
"+absolutePath);
+                                       
+                                       final URL sessionURL = new URL("file:/" 
+ absolutePath.replace("%", "%25"));
+                                       
+                                       System.out.println("sessionURL =" + 
sessionURL.toString());
+                                       
+                                       reader = new 
CytoscapeSessionReader(sessionURL);
+                                       
                                        //sessionName = shortName.getName();
-                                       
+                                       /*
                                        final File _sessionFile = new 
File(sessionFile);
                                        reader = new 
CytoscapeSessionReader(_sessionFile.toURL());
+                                       
+                                       
System.out.println("_sessionFile.toURL().toString() 
="+_sessionFile.toURL().toString());
+                                       
                                        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.

Reply via email to