diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2006-01-06 09:47:54 +0000 |
---|---|---|
committer | Miklos Szeredi <miklos@szeredi.hu> | 2006-01-06 09:47:54 +0000 |
commit | 0af762ad5b5c4c86bb1976d3d0268e3b51c1cf10 (patch) | |
tree | 7e0628dd4e0acf1fe943bd25a415b91927b6a7fa | |
parent | f1941479b277a89e9ab06845d0c01199c30a643f (diff) | |
download | libfuse-0af762ad5b5c4c86bb1976d3d0268e3b51c1cf10.tar.gz |
fix
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | lib/helper.c | 7 |
2 files changed, 12 insertions, 0 deletions
@@ -1,3 +1,8 @@ +2006-01-06 Miklos Szeredi <miklos@szeredi.hu> + + * Change working directory to "/" even if running in the + foreground. Patch from Jonathan Brandmeyer + 2006-01-02 Miklos Szeredi <miklos@szeredi.hu> * mount.fuse: the 'user' option should be ignored. Report and diff --git a/lib/helper.c b/lib/helper.c index 1e46476..38f048b 100644 --- a/lib/helper.c +++ b/lib/helper.c @@ -273,6 +273,13 @@ static struct fuse *fuse_setup_common(int argc, char *argv[], perror("fuse: failed to daemonize program\n"); goto err_destroy; } + } else { + /* Ensure consistant behavior across debug and normal modes */ + res = chdir("/"); + if (res == -1) { + perror("fuse: failed to change working directory to /\n"); + goto err_destroy; + } } res = set_signal_handlers(); |