don't fail if directory already exists

This commit is contained in:
Maxim Shafirov
2011-04-02 18:38:17 +04:00
parent aae94afff2
commit 8650c39e72
@@ -115,7 +115,7 @@ public class JetCompiler implements TranslatingCompiler {
private static File dirForPackage(VirtualFile root, String fqName) throws IOException {
File result = new File(root.getPath(), fqName.replace(".", "/"));
if (!result.mkdirs()) {
if (!result.exists() && !result.mkdirs()) {
throw new IOException("Failed to create directory for package");
}
return result;