[armedbear-cvs] r12799 - trunk/abcl/src/org/armedbear/lisp

Mark Evenson mevenson at common-lisp.net
Sat Jul 10 20:37:05 UTC 2010


Author: mevenson
Date: Sat Jul 10 16:37:04 2010
New Revision: 12799

Log:
Backout partial bad merge.



Modified:
   trunk/abcl/src/org/armedbear/lisp/Pathname.java

Modified: trunk/abcl/src/org/armedbear/lisp/Pathname.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/Pathname.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/Pathname.java	Sat Jul 10 16:37:04 2010
@@ -580,8 +580,8 @@
         // the namestring." 19.2.2.2.3.1
         if (host != NIL) {
             Debug.assertTrue(host instanceof AbstractString 
-                             || host instanceof Cons);
-            if (host instanceof Cons) {
+                             || isURL());
+            if (isURL()) {
                 LispObject scheme = Symbol.GETF.execute(host, SCHEME, NIL);
                 LispObject authority = Symbol.GETF.execute(host, AUTHORITY, NIL);
                 Debug.assertTrue(scheme != NIL);
@@ -605,7 +605,7 @@
         }
         if (device == NIL) {
         } else if (device == Keyword.UNSPECIFIC) {
-        } else if (device instanceof Cons) {
+        } else if (isJar()) {
             LispObject[] jars = ((Cons) device).copyToArray();
             StringBuilder prefix = new StringBuilder();
             for (int i = 0; i < jars.length; i++) {
@@ -617,9 +617,6 @@
                 sb.append("!/");
             }
             sb = prefix.append(sb);
-        } else if (device instanceof AbstractString
-          && device.getStringValue().startsWith("jar:")) {
-            sb.append(device.getStringValue());
         } else if (device instanceof AbstractString) {
             sb.append(device.getStringValue());
             if (this instanceof LogicalPathname
@@ -697,7 +694,7 @@
             }
         }
         namestring = sb.toString();
-        // XXX Decide when this is necessary
+        // XXX Decide if this is necessary
         // if (isURL()) { 
         //     namestring = Utilities.uriEncode(namestring);
         // }
@@ -1261,7 +1258,7 @@
             if (host == NIL) {
                 host = defaults.host;
             }
-            if (directory == NIL && defaults != null) {
+            if (directory == NIL) {
                 directory = defaults.directory;
             }
             if (!deviceSupplied) {
@@ -2056,7 +2053,8 @@
             if (pathname.isURL()) {
                 result = new URL(pathname.getNamestring());
             } else {
-                // XXX ensure that we have cannonical path.
+                // XXX Properly encode Windows drive letters and UNC paths
+                // XXX ensure that we have cannonical path?
                 result = new URL("file://" + pathname.getNamestring());
             }
         } catch (MalformedURLException e) {




More information about the armedbear-cvs mailing list