From 06e7794dd823f40c9fbeaf1a14ae8f82fde6f1eb Mon Sep 17 00:00:00 2001
From: Andy Cedilnik <andy.cedilnik@kitware.com>
Date: Fri, 16 Dec 2005 09:03:04 -0500
Subject: [PATCH] BUG: Return if the file is in any directory not just in first
 one

---
 SystemTools.cxx | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/SystemTools.cxx b/SystemTools.cxx
index af525bf4..5115ca9f 100644
--- a/SystemTools.cxx
+++ b/SystemTools.cxx
@@ -1959,7 +1959,10 @@ kwsys_stl::string SystemTools::FindProgram(
     kwsys_stl::string result = SystemTools::FindProgram(it->c_str(), 
                                                   path, 
                                                   noSystemPath);
-    return result;
+    if ( !result.empty() )
+      {
+      return result;
+      }
     }
   return "";
 }
-- 
GitLab