From 3652bec7467c182744c6a1ada6f9983cee1cbc5f Mon Sep 17 00:00:00 2001 From: Sergey Bugaev Date: Sat, 21 Sep 2019 00:45:16 +0300 Subject: Kernel: Make proper use of the new keep_empty argument --- Kernel/FileSystem/VirtualFileSystem.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Kernel/FileSystem') diff --git a/Kernel/FileSystem/VirtualFileSystem.cpp b/Kernel/FileSystem/VirtualFileSystem.cpp index 5e63245f4f..14a278d779 100644 --- a/Kernel/FileSystem/VirtualFileSystem.cpp +++ b/Kernel/FileSystem/VirtualFileSystem.cpp @@ -643,7 +643,7 @@ KResultOr> VFS::resolve_path(StringView path, Custody& ba if (path.is_empty()) return KResult(-EINVAL); - auto parts = path.split_view('/'); + auto parts = path.split_view('/', true); InodeIdentifier crumb_id; NonnullRefPtrVector custody_chain; @@ -675,7 +675,7 @@ KResultOr> VFS::resolve_path(StringView path, Custody& ba auto& part = parts[i]; if (part.is_empty()) - break; + continue; auto& current_parent = custody_chain.last(); crumb_id = crumb_inode->lookup(part); -- cgit v1.2.3