If build.path is specified, create it if needed

When no build.path preference is present, a temporary directory is
automatically created (and deleted). When a build.path was specified,
but the directory does not exist, the IDE would show an error and fail
to build, which is unexpected and not so friendly.

This commit makes sure that the build directory is automatically
created.
This commit is contained in:
Matthijs Kooijman 2014-04-09 21:56:55 +02:00 committed by Cristian Maglie
parent c959388b37
commit f47ec35ebe
1 changed files with 2 additions and 0 deletions

View File

@ -2089,6 +2089,8 @@ public class Base {
String buildPath = Preferences.get("build.path");
if (buildPath != null) {
buildFolder = Base.absoluteFile(buildPath);
if (!buildFolder.exists())
buildFolder.mkdirs();
} else {
//File folder = new File(getTempFolder(), "build");
//if (!folder.exists()) folder.mkdirs();