Changeset 15411


Ignore:
Timestamp:
10/14/20 07:07:20 (2 years ago)
Author:
Mark Evenson
Message:

FILE-DELETE for pathnames for ZipCache? items now works

Construct from JAR-PATHNAME from PATHNAME with proper type.

Location:
trunk/abcl/src/org/armedbear/lisp
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/src/org/armedbear/lisp/JarPathname.java

    r15410 r15411  
    7070  public static JarPathname createFromPathname(Pathname p) {
    7171    JarPathname result = new JarPathname();
    72     Pathname rootDevice = new Pathname();
     72    URLPathname rootDevice = new URLPathname();
    7373
    7474    if (p instanceof URLPathname) {
     
    7777      // FIXME: not going to work with namestrings with characters
    7878      // that need URI escaping
    79       URLPathname r = new URLPathname();
    80       r.copyFrom(p);
    81       rootDevice = r;
     79      rootDevice.copyFrom(p);
    8280    } else {
    8381      simple_error("Argument is already a JAR-PATHNAME: ~a", p);
  • trunk/abcl/src/org/armedbear/lisp/ZipCache.java

    r15408 r15411  
    559559    }
    560560  }
     561
     562  synchronized public static boolean remove(Pathname pathname) {
     563    JarPathname p = JarPathname.createFromPathname(pathname);
     564    return remove(p);
     565  }
    561566     
    562567  synchronized public static boolean remove(JarPathname p) {
    563     Archive archive = cache.get(p.getNamestring());
     568    Archive archive = cache.get(p);
    564569    if (archive != null) {
    565570      archive.close();
  • trunk/abcl/src/org/armedbear/lisp/delete_file.java

    r15408 r15411  
    8585      if (file.exists()) {
    8686        // File exists.
    87         for (int i = 0; i < 5; i++) {
    88           if (file.delete())
     87        for (int i = 0; i < 2; i++) {
     88          if (file.delete()) {
    8989            return T;
     90    }
     91    // Under Windows our fasls get placed in the ZipCache when compiled
     92    ZipCache.remove(defaultedPathname);
    9093          System.gc();
    9194          Thread.yield();
Note: See TracChangeset for help on using the changeset viewer.