From 14ca140135f9bc62dae7f59ea7ed5088c7342dbf Mon Sep 17 00:00:00 2001 From: Emery Hemingway Date: Thu, 31 Mar 2016 16:42:28 +0200 Subject: [PATCH] lib/vfs: fix disappearing Issue #1751 --- repos/os/include/vfs/dir_file_system.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/repos/os/include/vfs/dir_file_system.h b/repos/os/include/vfs/dir_file_system.h index f204d11426..fdef8d66f4 100644 --- a/repos/os/include/vfs/dir_file_system.h +++ b/repos/os/include/vfs/dir_file_system.h @@ -334,7 +334,7 @@ class Vfs::Dir_file_system : public File_system if (!path) return DIRENT_ERR_INVALID_PATH; - return _dirent_of_file_systems(path, index, out); + return _dirent_of_file_systems(*path ? path : "/", index, out); } file_size num_dirent(char const *path) override @@ -359,7 +359,7 @@ class Vfs::Dir_file_system : public File_system * matching dirents of all our file systems. Otherwise, * the specified path lies outside our directory node. */ - return path ? _sum_dirents_of_file_systems(path) : 0; + return path ? _sum_dirents_of_file_systems(*path ? path : "/") : 0; } }