From fe966eaa3917d9202735d171159df68febf9cdbf Mon Sep 17 00:00:00 2001 From: jprocter Date: Wed, 6 Jun 2012 19:02:52 +0100 Subject: [PATCH] JWS-44 - attempt to make a file executable if it is supposed to be executable according to jabaws configuration. --- engine/compbio/engine/client/PathValidator.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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) -- 1.7.10.2