aboutsummaryrefslogtreecommitdiffhomepage
path: root/path.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-04-27 00:45:38 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-04-27 00:45:38 -0700
commitfe6699f0bfb5b6aeb52ee223cdbfc00ae6a62a5e (patch)
tree939c1631d33819f54b4952d744da103b2685e365 /path.cpp
parent807c5f2ef224ea2fb6e2866f4a7f531b78703d43 (diff)
Rely on $PWD instead of getcwd() more often
Diffstat (limited to 'path.cpp')
-rw-r--r--path.cpp15
1 files changed, 0 insertions, 15 deletions
diff --git a/path.cpp b/path.cpp
index 679e898a..73cfc017 100644
--- a/path.cpp
+++ b/path.cpp
@@ -446,18 +446,3 @@ bool paths_are_same_file(const wcstring &path1, const wcstring &path2)
return false;
}
}
-
-wcstring get_working_directory(void)
-{
- wcstring wd = L"./";
- wchar_t dir_path[4096];
- const wchar_t *cwd = wgetcwd(dir_path, 4096);
- if (cwd)
- {
- wd = cwd;
- /* Make sure the working directory ends with a slash */
- if (! wd.empty() && wd.at(wd.size() - 1) != L'/')
- wd.push_back(L'/');
- }
- return wd;
-}