BUG: CollapseFullPath was calling SplitProgramPath before changing the working directory to in_base.
This commit is contained in:
parent
bcd4f87414
commit
f48941f261
@ -1318,9 +1318,6 @@ kwsys_stl::string SystemTools::CollapseFullPath(const char* in_relative)
|
|||||||
kwsys_stl::string SystemTools::CollapseFullPath(const char* in_relative,
|
kwsys_stl::string SystemTools::CollapseFullPath(const char* in_relative,
|
||||||
const char* in_base)
|
const char* in_base)
|
||||||
{
|
{
|
||||||
kwsys_stl::string dir, file;
|
|
||||||
SystemTools::SplitProgramPath(in_relative, dir, file, false);
|
|
||||||
|
|
||||||
// Save original working directory.
|
// Save original working directory.
|
||||||
kwsys_stl::string orig = SystemTools::GetCurrentWorkingDirectory();
|
kwsys_stl::string orig = SystemTools::GetCurrentWorkingDirectory();
|
||||||
|
|
||||||
@ -1330,6 +1327,9 @@ kwsys_stl::string SystemTools::CollapseFullPath(const char* in_relative,
|
|||||||
Chdir(in_base);
|
Chdir(in_base);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
kwsys_stl::string dir, file;
|
||||||
|
SystemTools::SplitProgramPath(in_relative, dir, file, false);
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
// Follow relative path.
|
// Follow relative path.
|
||||||
if(!(dir == ""))
|
if(!(dir == ""))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user