From 8a9b18e40e37d8ab32dc02416336bef55e449c7e Mon Sep 17 00:00:00 2001 From: Emery Hemingway Date: Mon, 16 Jul 2018 17:04:44 +0200 Subject: [PATCH] Fix for single file VFS servers The VFS server does not support file-system with one single-file plugin providing the root. This is because the "leaf_path" is not universally implemented to handle the path "/". This fix is simply to skip a "leaf_path" check when opening the path "/". Ref #2919 --- repos/os/src/server/vfs/main.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repos/os/src/server/vfs/main.cc b/repos/os/src/server/vfs/main.cc index c81e74fb84..5f6bc43d68 100644 --- a/repos/os/src/server/vfs/main.cc +++ b/repos/os/src/server/vfs/main.cc @@ -554,7 +554,7 @@ class Vfs_server::Session_component : public File_system::Session_rpc_object, /* re-root the path */ Path sub_path(path_str+1, _root_path.base()); path_str = sub_path.base(); - if (!_vfs.leaf_path(path_str)) + if (sub_path != "/" && !_vfs.leaf_path(path_str)) throw Lookup_failed(); Node *node;