diff options
author | Brad King <brad.king@kitware.com> | 2003-12-30 18:38:32 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2003-12-30 18:38:32 (GMT) |
commit | f48941f261bee3a6ae49fdc9cda177908ba76af6 (patch) | |
tree | c7b9a7aed177d6ff381ed3e662bdbde80a09674a /Source/kwsys | |
parent | bcd4f87414a191b49b093e6094efd885322d24b5 (diff) | |
download | CMake-f48941f261bee3a6ae49fdc9cda177908ba76af6.zip CMake-f48941f261bee3a6ae49fdc9cda177908ba76af6.tar.gz CMake-f48941f261bee3a6ae49fdc9cda177908ba76af6.tar.bz2 |
BUG: CollapseFullPath was calling SplitProgramPath before changing the working directory to in_base.
Diffstat (limited to 'Source/kwsys')
-rw-r--r-- | Source/kwsys/SystemTools.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx index 4e083c3..6b8099c 100644 --- a/Source/kwsys/SystemTools.cxx +++ b/Source/kwsys/SystemTools.cxx @@ -1318,9 +1318,6 @@ kwsys_stl::string SystemTools::CollapseFullPath(const char* in_relative) kwsys_stl::string SystemTools::CollapseFullPath(const char* in_relative, const char* in_base) { - kwsys_stl::string dir, file; - SystemTools::SplitProgramPath(in_relative, dir, file, false); - // Save original working directory. kwsys_stl::string orig = SystemTools::GetCurrentWorkingDirectory(); @@ -1330,6 +1327,9 @@ kwsys_stl::string SystemTools::CollapseFullPath(const char* in_relative, Chdir(in_base); } + kwsys_stl::string dir, file; + SystemTools::SplitProgramPath(in_relative, dir, file, false); + #ifdef _WIN32 // Follow relative path. if(!(dir == "")) |