summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--api/src/glfs.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/api/src/glfs.c b/api/src/glfs.c
index 48af2412b8b..8389d674266 100644
--- a/api/src/glfs.c
+++ b/api/src/glfs.c
@@ -803,6 +803,11 @@ pub_glfs_init (struct glfs *fs)
ret = glfs_init_wait (fs);
+ /* Set the initial current working directory to "/" */
+ if (ret >= 0) {
+ ret = glfs_chdir (fs, "/");
+ }
+
return ret;
}