From f169ef95aac62e0338a2564775cff6095312af5c Mon Sep 17 00:00:00 2001 From: Federico Fissore Date: Mon, 29 Jun 2015 14:46:46 +0200 Subject: [PATCH] Windows: using BaseNoGui.getContentFile instead of directly using "user.dir" property --- arduino-core/src/processing/app/windows/Platform.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arduino-core/src/processing/app/windows/Platform.java b/arduino-core/src/processing/app/windows/Platform.java index b1f726ca9..c4e7d394f 100644 --- a/arduino-core/src/processing/app/windows/Platform.java +++ b/arduino-core/src/processing/app/windows/Platform.java @@ -28,6 +28,7 @@ import org.apache.commons.exec.CommandLine; import org.apache.commons.exec.DefaultExecutor; import org.apache.commons.exec.Executor; import org.apache.commons.exec.PumpStreamHandler; +import processing.app.BaseNoGui; import processing.app.debug.TargetPackage; import processing.app.legacy.PApplet; import processing.app.legacy.PConstants; @@ -194,7 +195,7 @@ public class Platform extends processing.app.Platform { executor.setStreamHandler(new PumpStreamHandler(baos, null)); try { - String listComPorts = new File(System.getProperty("user.dir"), "hardware/tools/listComPorts.exe").getCanonicalPath(); + String listComPorts = BaseNoGui.getContentFile("hardware/tools/listComPorts.exe").getCanonicalPath(); CommandLine toDevicePath = CommandLine.parse(listComPorts); executor.execute(toDevicePath);