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

Erik Huelsmann ehuelsmann at common-lisp.net
Sun Oct 3 21:39:44 UTC 2010


Author: ehuelsmann
Date: Sun Oct  3 17:39:43 2010
New Revision: 12947

Log:
Fix ZIP on Windows; in some ABCL lisp tests, it thinks we're trying
to add the same entry multiple times, because it doesn't recognize
the directories. (We use forward slashes as component separators now.)

Modified:
   trunk/abcl/src/org/armedbear/lisp/Pathname.java
   trunk/abcl/src/org/armedbear/lisp/zip.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	Sun Oct  3 17:39:43 2010
@@ -52,6 +52,11 @@
 
 public class Pathname extends LispObject {
 
+    /** The path component separator used by internally generated
+     * path namestrings.
+     */
+    public final static char separator = '/';
+
     protected LispObject host = NIL;
     protected LispObject device = NIL;
     protected LispObject directory = NIL;

Modified: trunk/abcl/src/org/armedbear/lisp/zip.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/zip.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/zip.java	Sun Oct  3 17:39:43 2010
@@ -130,9 +130,9 @@
                   String d = dir.substring(rootPathLength);
                   int i = 0;
                   int j;
-                  while ((j = d.indexOf(File.separator, i)) != -1) {
+                  while ((j = d.indexOf(Pathname.separator, i)) != -1) {
                     i = j + 1;
-                    directory = d.substring(0, j).replace(File.separatorChar, '/') + "/";
+                    directory = d.substring(0, j) + Pathname.separator;
                     if (!directories.contains(directory)) {
                       directories.add(directory);
                       ZipEntry entry = new ZipEntry(directory);




More information about the armedbear-cvs mailing list