From 56cccde235cbe24df7c108fd475fddfd84869d93 Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 3 Apr 2020 09:46:03 -0400 Subject: cmWorkingDirectory: Add GetOldDirectory method --- Source/CPack/cmCPackGenerator.cxx | 4 ++-- Source/cmWorkingDirectory.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx index 712eb77..43f0d3c 100644 --- a/Source/CPack/cmCPackGenerator.cxx +++ b/Source/CPack/cmCPackGenerator.cxx @@ -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); } } } diff --git a/Source/cmWorkingDirectory.h b/Source/cmWorkingDirectory.h index d4a164d..4c7576d 100644 --- a/Source/cmWorkingDirectory.h +++ b/Source/cmWorkingDirectory.h @@ -37,6 +37,8 @@ public: */ int GetLastResult() const { return ResultCode; } + std::string const& GetOldDirectory() const { return this->OldDir; } + private: std::string OldDir; int ResultCode; -- cgit v0.12