From: jprocter Date: Wed, 6 Jun 2012 18:02:52 +0000 (+0100) Subject: JWS-44 - attempt to make a file executable if it is supposed to be executable accordi... X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=fe966eaa3917d9202735d171159df68febf9cdbf;p=jabaws.git JWS-44 - attempt to make a file executable if it is supposed to be executable according to jabaws configuration. --- diff --git a/engine/compbio/engine/client/PathValidator.java b/engine/compbio/engine/client/PathValidator.java index a10d82e..6c3996c 100644 --- a/engine/compbio/engine/client/PathValidator.java +++ b/engine/compbio/engine/client/PathValidator.java @@ -33,7 +33,18 @@ public final class PathValidator { if (!exec.exists()) { return false; } - return exec.canExecute(); + if (!exec.canExecute()) { + try { + return exec.setExecutable(true); + } catch (Exception x) + { + + }catch (Error e) + { + } + return false; + } + return true; } public static void validateExecutable(String command)