From b7daf709cea5ab435e001d8dad72d134ba0a5b47 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Mon, 28 May 2018 15:22:54 +0100 Subject: [PATCH] JAL-2994 restrict search to \Program Files\Chimera* --- src/ext/edu/ucsf/rbvi/strucviz2/StructureManager.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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")) -- 1.7.10.2