diff --git a/SystemTools.cxx b/SystemTools.cxx index 76d22b31e27f77362b7503560d83822ed3b6f845..0f5e9552d5bf2027ae985035b4af34db80316c5d 100644 --- a/SystemTools.cxx +++ b/SystemTools.cxx @@ -2997,11 +2997,10 @@ std::string SystemTools::FindProgram( #endif // now try just the name - tryPath = name; - if(SystemTools::FileExists(tryPath) && - !SystemTools::FileIsDirectory(tryPath)) + if(SystemTools::FileExists(name) && + !SystemTools::FileIsDirectory(name)) { - return SystemTools::CollapseFullPath(tryPath); + return SystemTools::CollapseFullPath(name); } // now construct the path std::vector<std::string> path;