diff --git a/bundles/com.espressif.idf.core/src/com/espressif/idf/core/SystemExecutableFinder.java b/bundles/com.espressif.idf.core/src/com/espressif/idf/core/SystemExecutableFinder.java index cda63ef63..9d927c859 100644 --- a/bundles/com.espressif.idf.core/src/com/espressif/idf/core/SystemExecutableFinder.java +++ b/bundles/com.espressif.idf.core/src/com/espressif/idf/core/SystemExecutableFinder.java @@ -5,11 +5,13 @@ package com.espressif.idf.core; import java.io.File; +import java.io.IOException; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.Path; import org.eclipse.core.runtime.Platform; +import com.espressif.idf.core.logging.Logger; import com.espressif.idf.core.util.StringUtil; public class SystemExecutableFinder implements ExecutableFinder @@ -79,9 +81,21 @@ private IPath findExecutable(IPath path) } } - else if (isExecutable(path)) + else { - return path; + try + { + Runtime.getRuntime().exec("/bin/chmod 755 ".concat(path.toOSString())); //$NON-NLS-1$ + } + catch (IOException e) + { + Logger.log(e); + } + + if (isExecutable(path)) + { + return path; + } } return null; } @@ -100,7 +114,7 @@ private boolean isExecutable(IPath path) { return false; } - + return file.canExecute(); } }