BUG: CollapseFullPath was calling SplitProgramPath before changing the working directory to in_base.

This commit is contained in:
Brad King 2003-12-30 13:38:32 -05:00
parent bcd4f87414
commit f48941f261
1 changed files with 3 additions and 3 deletions

View File

@ -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 == ""))