diff --git a/src/system/kernel/fs/vfs.cpp b/src/system/kernel/fs/vfs.cpp index 7f21fa281d..06a01551c1 100644 --- a/src/system/kernel/fs/vfs.cpp +++ b/src/system/kernel/fs/vfs.cpp @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include @@ -1940,7 +1941,7 @@ vnode_and_path_to_dir_vnode(struct vnode* vnode, char *path, return B_BAD_VALUE; if (*path == '\0') return B_ENTRY_NOT_FOUND; - if (vnode == NULL) + if (vnode == NULL || path[0] == '/') return path_to_dir_vnode(path, _vnode, filename, kernel); status_t status = get_dir_path_and_leaf(path, filename);