From: gmungoc Date: Mon, 28 May 2018 14:22:54 +0000 (+0100) Subject: JAL-2994 restrict search to \Program Files\Chimera* X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=b7daf709cea5ab435e001d8dad72d134ba0a5b47;p=jalview.git JAL-2994 restrict search to \Program Files\Chimera* --- diff --git a/src/ext/edu/ucsf/rbvi/strucviz2/StructureManager.java b/src/ext/edu/ucsf/rbvi/strucviz2/StructureManager.java index a52adc5..c278db5 100644 --- a/src/ext/edu/ucsf/rbvi/strucviz2/StructureManager.java +++ b/src/ext/edu/ucsf/rbvi/strucviz2/StructureManager.java @@ -946,10 +946,15 @@ public class StructureManager { /* * match a path ending in \bin\chimera or \bin\chimera.exe - * back-slash is double escaped - for Java String, and regex pattern + * back-slashes are double escaped - for Java String, and for regex */ - pathList.addAll(FileUtils.findMatchingPaths( - ".*\\\\bin\\\\chimera(\\\\.exe)?$", Paths.get(root))); + for (String version : FileUtils + .findMatchingPaths(".*\\\\Chimera.*$", Paths.get(root))) + { + pathList.addAll(FileUtils.findMatchingPaths( + ".*\\\\bin\\\\chimera(\\\\.exe)?$", + Paths.get(version))); + } } } else if (os.startsWith("Mac"))