summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Bugaev <bugaevc@gmail.com>2019-09-21 00:45:16 +0300
committerAndreas Kling <awesomekling@gmail.com>2019-09-28 18:29:42 +0200
commit3652bec7467c182744c6a1ada6f9983cee1cbc5f (patch)
tree9231b84cf854ee8dc4bba8d2e1b3bcecf85292d4
parent127d168def2a8f74399784d05fa7f13773939665 (diff)
downloadserenity-3652bec7467c182744c6a1ada6f9983cee1cbc5f.zip
Kernel: Make proper use of the new keep_empty argument
-rw-r--r--Kernel/FileSystem/VirtualFileSystem.cpp4
1 files changed, 2 insertions, 2 deletions
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<NonnullRefPtr<Custody>> 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, 32> custody_chain;
@@ -675,7 +675,7 @@ KResultOr<NonnullRefPtr<Custody>> 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);