From e0fd9965a1ffacf4ac034a79e7cb5f7e898ff69f Mon Sep 17 00:00:00 2001 From: gmungoc Date: Wed, 6 Jun 2018 15:33:26 +0100 Subject: [PATCH] JAL-3013 resolve symlink to hmmer binaries folder --- src/jalview/hmmer/HmmerCommand.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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) { -- 1.7.10.2