aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/helper.c7
1 files changed, 7 insertions, 0 deletions
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();