diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2013-04-27 00:45:38 -0700 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2013-04-27 00:45:38 -0700 |
commit | fe6699f0bfb5b6aeb52ee223cdbfc00ae6a62a5e (patch) | |
tree | 939c1631d33819f54b4952d744da103b2685e365 /path.cpp | |
parent | 807c5f2ef224ea2fb6e2866f4a7f531b78703d43 (diff) |
Rely on $PWD instead of getcwd() more often
Diffstat (limited to 'path.cpp')
-rw-r--r-- | path.cpp | 15 |
1 files changed, 0 insertions, 15 deletions
@@ -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; -} |