summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/volumesfs.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/volumesfs.c b/src/volumesfs.c
index dc67f77..4226b94 100644
--- a/src/volumesfs.c
+++ b/src/volumesfs.c
@@ -98,8 +98,15 @@ static int volumesfs_getattr(const char *path, struct stat *stbuf)
stbuf->st_mode = S_IFDIR | 0755;
stbuf->st_nlink = 2;
} else {
- stbuf->st_mode = S_IFLNK | 0444;
- stbuf->st_nlink = 1;
+ G_LOCK(mounts);
+ const gchar *mountpoint = g_hash_table_lookup(mounts, path + 1);
+ G_UNLOCK(mounts);
+ if (mountpoint) {
+ stbuf->st_mode = S_IFLNK | 0444;
+ stbuf->st_nlink = 1;
+ } else {
+ return -ENOENT;
+ }
}
return 0;
}