From ad2437f08c24b4ffce7814dd5bfd4e5d043e09ba Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 25 May 2001 14:31:35 -0400 Subject: [PATCH] BUG: Added hack to cmSystemTools::GetPath to make its algorithm correctly parse off the last entry of the system PATH environment variable. --- Source/cmSystemTools.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 4af424216..f2ef341de 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -90,6 +90,11 @@ void cmSystemTools::GetPath(std::vector& path) const char* pathSep = ":"; #endif std::string pathEnv = getenv("PATH"); + // A hack to make the below algorithm work. + if(pathEnv[pathEnv.length()-1] != ':') + { + pathEnv += ":"; + } std::string::size_type start =0; bool done = false; while(!done)