From aa48a097d2bac31d62e4d378e7b8084fea6f6601 Mon Sep 17 00:00:00 2001 From: Alexey Andreev Date: Thu, 16 Nov 2017 13:57:41 +0300 Subject: [PATCH] Fix bug in File.createTempFile --- classlib/src/main/java/org/teavm/classlib/java/io/TFile.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classlib/src/main/java/org/teavm/classlib/java/io/TFile.java b/classlib/src/main/java/org/teavm/classlib/java/io/TFile.java index e088a7b97..10d515a7f 100644 --- a/classlib/src/main/java/org/teavm/classlib/java/io/TFile.java +++ b/classlib/src/main/java/org/teavm/classlib/java/io/TFile.java @@ -508,10 +508,10 @@ public class TFile implements Serializable, Comparable { if (directory == null) { String tmpDir = System.getProperty("java.io.tmpdir", "."); tmpDirFile = new TFile(tmpDir); + tmpDirFile.mkdirs(); } else { tmpDirFile = directory; } - tmpDirFile.mkdirs(); TFile result; do { result = genTempFile(prefix, newSuffix, tmpDirFile);