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

Mark Evenson mevenson at common-lisp.net
Thu Feb 11 12:16:52 UTC 2010


Author: mevenson
Date: Thu Feb 11 07:16:51 2010
New Revision: 12448

Log:
Remove potentially present ZipCache files entries on DELETE-FILE and RENAME-FILE.

Corrects failing COMPILE-FILE.* ANSI-TESTs under Windows.



Modified:
   trunk/abcl/src/org/armedbear/lisp/Pathname.java
   trunk/abcl/src/org/armedbear/lisp/ZipCache.java
   trunk/abcl/src/org/armedbear/lisp/delete_file.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	Thu Feb 11 07:16:51 2010
@@ -1896,6 +1896,7 @@
                 final File destination = new File(newNamestring);
                 if (Utilities.isPlatformWindows) {
                     if (destination.isFile()) {
+			ZipCache.remove(destination);
                         destination.delete();
                     }
                 }

Modified: trunk/abcl/src/org/armedbear/lisp/ZipCache.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/ZipCache.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/ZipCache.java	Thu Feb 11 07:16:51 2010
@@ -166,13 +166,11 @@
     @Override
     public LispObject execute(LispObject arg) {
       Pathname p = coerceToPathname(arg);
-      URL url = Pathname.makeURL(p);
-      boolean result = ZipCache.remove(url);
+      boolean result = ZipCache.remove(p);
       return result ? T : NIL;
     }
   }
       
-
   public static boolean remove(URL url) {
     Entry entry = zipCache.get(url);
     if (entry != null) {
@@ -184,4 +182,18 @@
     }
     return false;
   }
-  }
\ No newline at end of file
+
+  public static boolean remove(Pathname p) {
+    URL url = Pathname.makeURL(p);
+    if (url == null) {
+      return false;
+    }
+    return ZipCache.remove(url);
+  }
+
+  public static boolean remove(File f) {
+    Pathname p = Pathname.makePathname(f);
+    return ZipCache.remove(p);
+  }
+    
+}
\ No newline at end of file

Modified: trunk/abcl/src/org/armedbear/lisp/delete_file.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/delete_file.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/delete_file.java	Thu Feb 11 07:16:51 2010
@@ -68,6 +68,7 @@
             return error(new FileError("Pathname has no namestring: " + defaultedPathname.writeToString(),
                                         defaultedPathname));
         final File file = new File(namestring);
+	ZipCache.remove(file);
         if (file.exists()) {
             // File exists.
             for (int i = 0; i < 5; i++) {




More information about the armedbear-cvs mailing list