From: gmungoc Date: Wed, 6 Jun 2018 14:33:26 +0000 (+0100) Subject: JAL-3013 resolve symlink to hmmer binaries folder X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=e0fd9965a1ffacf4ac034a79e7cb5f7e898ff69f;p=jalview.git JAL-3013 resolve symlink to hmmer binaries folder --- diff --git a/src/jalview/hmmer/HmmerCommand.java b/src/jalview/hmmer/HmmerCommand.java index f8f2cde..b5c1b25 100644 --- a/src/jalview/hmmer/HmmerCommand.java +++ b/src/jalview/hmmer/HmmerCommand.java @@ -24,6 +24,7 @@ import java.io.File; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintWriter; +import java.nio.file.Paths; import java.util.ArrayList; import java.util.Hashtable; import java.util.List; @@ -247,10 +248,13 @@ public abstract class HmmerCommand implements Runnable * @param cmd * command short name e.g. hmmalign * @return + * @throws IOException */ - protected String getCommandPath(String cmd) + protected String getCommandPath(String cmd) throws IOException { String binariesFolder = Cache.getProperty(Preferences.HMMER_PATH); + // ensure any symlink to the directory is resolved: + binariesFolder = Paths.get(binariesFolder).toRealPath().toString(); File file = FileUtils.getExecutable(cmd, binariesFolder); if (file == null && af != null) {