Changeset 13946


Ignore:
Timestamp:
05/24/12 11:26:06 (9 years ago)
Author:
Mark Evenson
Message:

Use java.io.File routine to guarantee uniquely non-existing pathname for EXT:MAKE-TEMP-DIRECTORY.

File:
1 edited

Legend:

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

    r13943 r13946  
    293293    {
    294294      try {
    295           String tmpdir = System.getProperty("java.io.tmpdir");
    296           String name = Primitives.GENSYM.execute().getStringValue();
    297           File dir = new File(tmpdir, name);
    298 
    299           if (dir.mkdirs()) {
    300             return new Pathname(dir + "/");
    301           }
     295        File dir = File.createTempFile("abcl", null);
     296        dir.delete();
     297        if (dir.mkdirs()) {
     298          return new Pathname(dir + "/");
     299        }
    302300      } catch (Throwable t) {
    303301        Debug.trace(t);
Note: See TracChangeset for help on using the changeset viewer.