Commit 019afb6e authored by Brad King's avatar Brad King
Browse files

SystemTools: Drop GetCurrentWorkingDirectory 'collapse' argument

The result of `getcwd` is always an absolute canonical path and does not
need to be collapsed.
parent 313b2f7a
...@@ -3117,7 +3117,7 @@ int SystemTools::ChangeDirectory(const std::string& dir) ...@@ -3117,7 +3117,7 @@ int SystemTools::ChangeDirectory(const std::string& dir)
return Chdir(dir); return Chdir(dir);
} }
std::string SystemTools::GetCurrentWorkingDirectory(bool collapse) std::string SystemTools::GetCurrentWorkingDirectory()
{ {
char buf[2048]; char buf[2048];
const char* cwd = Getcwd(buf, 2048); const char* cwd = Getcwd(buf, 2048);
...@@ -3125,9 +3125,6 @@ std::string SystemTools::GetCurrentWorkingDirectory(bool collapse) ...@@ -3125,9 +3125,6 @@ std::string SystemTools::GetCurrentWorkingDirectory(bool collapse)
if (cwd) { if (cwd) {
path = cwd; path = cwd;
} }
if (collapse) {
return SystemTools::CollapseFullPath(path);
}
return path; return path;
} }
......
...@@ -869,7 +869,7 @@ public: ...@@ -869,7 +869,7 @@ public:
/** /**
* Get current working directory CWD * Get current working directory CWD
*/ */
static std::string GetCurrentWorkingDirectory(bool collapse = true); static std::string GetCurrentWorkingDirectory();
/** /**
* Change directory to the directory specified * Change directory to the directory specified
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment