Skip to content

Commit f169ef9

Browse files
author
Federico Fissore
committed
Windows: using BaseNoGui.getContentFile instead of directly using "user.dir" property
1 parent 6e8e3a7 commit f169ef9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

arduino-core/src/processing/app/windows/Platform.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import org.apache.commons.exec.DefaultExecutor;
2929
import org.apache.commons.exec.Executor;
3030
import org.apache.commons.exec.PumpStreamHandler;
31+
import processing.app.BaseNoGui;
3132
import processing.app.debug.TargetPackage;
3233
import processing.app.legacy.PApplet;
3334
import processing.app.legacy.PConstants;
@@ -194,7 +195,7 @@ public String preListAllCandidateDevices() {
194195
executor.setStreamHandler(new PumpStreamHandler(baos, null));
195196

196197
try {
197-
String listComPorts = new File(System.getProperty("user.dir"), "hardware/tools/listComPorts.exe").getCanonicalPath();
198+
String listComPorts = BaseNoGui.getContentFile("hardware/tools/listComPorts.exe").getCanonicalPath();
198199

199200
CommandLine toDevicePath = CommandLine.parse(listComPorts);
200201
executor.execute(toDevicePath);

0 commit comments

Comments
 (0)