[generator] Fix race condition when creating directories in JavaIoFileSystemAcces

Signed-off-by: Bernhard Stadler <bernhard.stadler@itemis.de>
This commit is contained in:
Bernhard Stadler 2016-05-11 17:49:12 +02:00
parent effbb402a1
commit 100f6e0eef

View file

@ -178,7 +178,7 @@ public class JavaIoFileSystemAccess extends AbstractFileSystemAccess2 {
}
protected void createFolder(File parent) {
if (parent != null && !parent.exists() && !parent.mkdirs())
if (parent != null && !parent.mkdirs() && !parent.isDirectory())
throw new RuntimeIOException("Could not create directory " + parent);
}