summaryrefslogtreecommitdiffabout
path: root/lib/sitecing_util.cc
Unidiff
Diffstat (limited to 'lib/sitecing_util.cc') (more/less context) (show 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
@@ -259,9 +259,10 @@ namespace sitecing {
259 return rv; 259 return rv;
260 } 260 }
261 261
262 void auto_chdir::pushdir(const string& td,bool ap) { 262 void auto_chdir::pushdir(const string& td,bool ap) {
263 char *tmp = get_current_dir_name(); 263 /* TODO: make use of fchdir(2) instead */
264 char *tmp = getcwd(0,0);
264 assert(tmp); 265 assert(tmp);
265 saved_pwd = tmp; 266 saved_pwd = tmp;
266 free(tmp); 267 free(tmp);
267 autopop=ap; 268 autopop=ap;