cmWorkingDirectory: Add GetOldDirectory method

This commit is contained in:
Brad King
2020-04-03 09:46:03 -04:00
parent 753817e71d
commit 56cccde235
2 changed files with 4 additions and 2 deletions

View File

@@ -402,7 +402,6 @@ int cmCPackGenerator::InstallProjectViaInstalledDirectories(
}
/* rebuild symlinks in the installed tree */
if (!symlinkedFiles.empty()) {
std::string curDir = cmSystemTools::GetCurrentWorkingDirectory();
std::string goToDir = cmStrCat(tempDir, '/', subdir);
cmCPackLogger(cmCPackLog::LOG_DEBUG,
"Change dir to: " << goToDir << std::endl);
@@ -441,7 +440,8 @@ int cmCPackGenerator::InstallProjectViaInstalledDirectories(
}
}
cmCPackLogger(cmCPackLog::LOG_DEBUG,
"Going back to: " << curDir << std::endl);
"Going back to: " << workdir.GetOldDirectory()
<< std::endl);
}
}
}

View File

@@ -37,6 +37,8 @@ public:
*/
int GetLastResult() const { return ResultCode; }
std::string const& GetOldDirectory() const { return this->OldDir; }
private:
std::string OldDir;
int ResultCode;