summaryrefslogtreecommitdiffabout
path: root/lib/sitecing_util.cc
Side-by-side diff
Diffstat (limited to 'lib/sitecing_util.cc') (more/less context) (ignore whitespace changes)
-rw-r--r--lib/sitecing_util.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sitecing_util.cc b/lib/sitecing_util.cc
index 9b6c54e..5466b28 100644
--- a/lib/sitecing_util.cc
+++ b/lib/sitecing_util.cc
@@ -257,13 +257,14 @@ namespace sitecing {
rv += '/';
rv += r;
return rv;
}
void auto_chdir::pushdir(const string& td,bool ap) {
- char *tmp = get_current_dir_name();
+ /* TODO: make use of fchdir(2) instead */
+ char *tmp = getcwd(0,0);
assert(tmp);
saved_pwd = tmp;
free(tmp);
autopop=ap;
if(chdir(td.c_str()))
throw konforka::exception(CODEPOINT,"failed to chdir()");