From f47ec35ebe47a81d0fc501ce6b1bf000d84649ba Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Wed, 9 Apr 2014 21:56:55 +0200 Subject: [PATCH] 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. --- app/src/processing/app/Base.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/processing/app/Base.java b/app/src/processing/app/Base.java index b483b2ada..49f1d3f73 100644 --- a/app/src/processing/app/Base.java +++ b/app/src/processing/app/Base.java @@ -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();