diff -r 2e8d9c2c20cd -r 9b4611f0cb4b src/org/armedbear/lisp/Pathname.java
--- a/src/org/armedbear/lisp/Pathname.java	Sun May 02 22:52:36 2010 +0200
+++ b/src/org/armedbear/lisp/Pathname.java	Fri Jul 02 13:01:40 2010 +0200
@@ -2,7 +2,7 @@
  * Pathname.java
  *
  * Copyright (C) 2003-2007 Peter Graves
- * $Id: Pathname.java 12642 2010-05-01 13:17:30Z mevenson $
+ * $Id: Pathname.java 12773 2010-07-01 20:57:11Z astalla $
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -233,7 +233,7 @@
             return;
         }
         if (s.equals(".") || s.equals("./")
-          || (Utilities.isPlatformWindows && s.equals(".\\"))) {
+            || Utilities.isPlatformWindows && s.equals(".\\")) {
             directory = new Cons(Keyword.RELATIVE);
             return;
         }
@@ -242,9 +242,9 @@
             return;
         }
         if (Utilities.isPlatformWindows) {
-            if (s.startsWith("\\\\")) {
+            if (s.startsWith("\\\\")) { // XXX what if string starts with '//'?
                 //UNC path support
-                // match \\<server>\<share>\[directories-and-files]
+                // match \\<servner>\<share>\[directories-and-files]
 
                 int shareIndex = s.indexOf('\\', 2);
                 int dirIndex = s.indexOf('\\', shareIndex + 1);
@@ -402,24 +401,9 @@
         }
 
         if (Utilities.isPlatformWindows) {
-            if (!s.contains(jarSeparator)) {
-                s = s.replace("/", "\\");
-            } else {
-              StringBuilder result = new StringBuilder();
-              for (int i = 0; i < s.length(); i++) {
-                  char c = s.charAt(i);
-                  if ( c != '/') {
-                      result.append(c);
-                  } else {
-                      if (i != 0 && s.charAt(i-1) != '!') {
-                          result.append("\\");
-                      } else {
-                          result.append(c);
-                      }
-                  }
-              }
-              s = result.toString();
-            }
+            if (s.contains("\\")) {
+                s = s.replace("\\", "/");
+            } 
         }
 
         // Expand user home directories
@@ -437,24 +421,13 @@
                 s = s.substring(2);
             }
         }
+
         String d = null;
-        // Find last file separator char.
-        if (Utilities.isPlatformWindows) {
-            for (int i = s.length(); i-- > 0;) {
-                char c = s.charAt(i);
-                if (c == '/' || c == '\\') {
-                    d = s.substring(0, i + 1);
-                    s = s.substring(i + 1);
-                    break;
-                }
-            }
-        } else {
-            for (int i = s.length(); i-- > 0;) {
-                if (s.charAt(i) == '/') {
-                    d = s.substring(0, i + 1);
-                    s = s.substring(i + 1);
-                    break;
-                }
+        for (int i = s.length(); i-- > 0;) {
+            if (s.charAt(i) == '/') {
+                d = s.substring(0, i + 1);
+                s = s.substring(i + 1);
+                break;
             }
         }
         if (d != null) {
@@ -739,12 +712,7 @@
         // is, both NIL and :UNSPECIFIC cause the component not to appear in
         // the namestring." 19.2.2.2.3.1
         if (directory != NIL) {
-            final char separatorChar;
-            if (device instanceof Cons) {
-                separatorChar = '/'; // Jar file.
-            } else {
-                separatorChar = File.separatorChar;
-            }
+            final char separatorChar = '/';
             LispObject temp = directory;
             LispObject part = temp.car();
             temp = temp.cdr();
@@ -792,18 +760,8 @@
         p.invalidateNamestring();
         String path = p.getNamestring();
         StringBuilder result = new StringBuilder();
-        if (Utilities.isPlatformWindows) {
-	    for (int i = 0; i < path.length(); i++) {
-		char c = path.charAt(i);
-		if (c == '\\') {
-		    result.append('/');
-		} else {
-		    result.append(c);
-		}
-	    }
-        } else  {
-            result.append(path);
-        }
+        result.append(path);
+            
         // Entries in jar files are always relative, but Pathname
         // directories are :ABSOLUTE.
         if (result.length() > 1
@@ -1379,7 +1337,7 @@
         final int limit = s.length();
         for (int i = 0; i < limit; i++) {
             char c = s.charAt(i);
-            if (c == '/' || c == '\\' && Utilities.isPlatformWindows) {
+            if (c == '/' || c == '\\' && Utilities.isPlatformWindows) { //XXX check Windows code path
                 error(new LispError("Invalid character #\\" + c
                   + " in pathname component \"" + s
                   + '"'));
