[armedbear-cvs] r13946 - trunk/abcl/src/org/armedbear/lisp
mevenson at common-lisp.net
mevenson at common-lisp.net
Thu May 24 11:26:06 UTC 2012
Author: mevenson
Date: Thu May 24 04:26:06 2012
New Revision: 13946
Log:
Use java.io.File routine to guarantee uniquely non-existing pathname for EXT:MAKE-TEMP-DIRECTORY.
Modified:
trunk/abcl/src/org/armedbear/lisp/Extensions.java
Modified: trunk/abcl/src/org/armedbear/lisp/Extensions.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/Extensions.java Thu May 24 04:11:44 2012 (r13945)
+++ trunk/abcl/src/org/armedbear/lisp/Extensions.java Thu May 24 04:26:06 2012 (r13946)
@@ -292,13 +292,11 @@
public LispObject execute()
{
try {
- String tmpdir = System.getProperty("java.io.tmpdir");
- String name = Primitives.GENSYM.execute().getStringValue();
- File dir = new File(tmpdir, name);
-
- if (dir.mkdirs()) {
- return new Pathname(dir + "/");
- }
+ File dir = File.createTempFile("abcl", null);
+ dir.delete();
+ if (dir.mkdirs()) {
+ return new Pathname(dir + "/");
+ }
} catch (Throwable t) {
Debug.trace(t);
}
More information about the armedbear-cvs
mailing list