Kernel: Make proper use of the new keep_empty argument

This commit is contained in:
Sergey Bugaev 2019-09-21 00:45:16 +03:00 committed by Andreas Kling
parent 127d168def
commit 3652bec746
Notes: sideshowbarker 2024-07-19 11:57:56 +09:00

View File

@ -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);