From 97c5e21ed61f262ff5e0055bdaa050500974f389 Mon Sep 17 00:00:00 2001 From: Emery Hemingway Date: Mon, 23 Oct 2017 21:59:14 -0500 Subject: [PATCH] server/vfs: do not append '/' to directory paths Fix #2544 --- repos/os/src/server/vfs/main.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/repos/os/src/server/vfs/main.cc b/repos/os/src/server/vfs/main.cc index 944e0c3d68..998c019477 100644 --- a/repos/os/src/server/vfs/main.cc +++ b/repos/os/src/server/vfs/main.cc @@ -427,7 +427,8 @@ class Vfs_server::Session_component : public File_system::Session_rpc_object, _assert_valid_path(path_str); Vfs_server::Path fullpath(_root->path()); - fullpath.append(path_str); + if (path_str[1] != '\0') + fullpath.append(path_str); path_str = fullpath.base(); if (!create && !_vfs.directory(path_str))