Fix bug in File.createTempFile

This commit is contained in:
Alexey Andreev 2017-11-16 13:57:41 +03:00
parent 7e422c081e
commit aa48a097d2

View File

@ -508,10 +508,10 @@ public class TFile implements Serializable, Comparable<TFile> {
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);