summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/rib.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/lib/rib.c b/src/lib/rib.c
index 909d217f..fa525c50 100644
--- a/src/lib/rib.c
+++ b/src/lib/rib.c
@@ -280,7 +280,16 @@ int rib_init(const char * prefix)
sprintf(rib.mnt, FUSE_PREFIX "/%s.%d", prefix, getpid());
if (stat(rib.mnt, &st) == -1)
- mkdir(rib.mnt, 0777);
+ switch(errno) {
+ case ENOENT:
+ mkdir(rib.mnt, 0777);
+ break;
+ case ENOTCONN:
+ fuse_unmount(rib.mnt, rib.ch);
+ break;
+ default:
+ return -1;
+ }
fuse_opt_parse(&args, NULL, NULL, NULL);