From 55415f418a807f5995fb1fb9e3af57181af89a2d Mon Sep 17 00:00:00 2001 From: Berk Geveci Date: Fri, 28 Sep 2001 12:14:52 -0400 Subject: [PATCH] BUG: separate path from file name before calling realpath --- Source/cmSystemTools.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 565e8fe97..fece05c51 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -1181,9 +1181,9 @@ void cmSystemTools::SplitProgramPath(const char* in_name, */ std::string cmSystemTools::CollapseFullPath(const char* in_name) { -#ifdef _WIN32 std::string dir, file; cmSystemTools::SplitProgramPath(in_name, dir, file); +#ifdef _WIN32 // Ultra-hack warning: // This changes to the target directory, saves the working directory, // and then changes back to the original working directory. @@ -1205,8 +1205,8 @@ std::string cmSystemTools::CollapseFullPath(const char* in_name) char resolved_name[5024]; # endif # endif - realpath(in_name, resolved_name); - return resolved_name; + realpath(dir.c_str(), resolved_name); + return dir + "/" + file; #endif }