mirror of
https://github.com/RGBCube/serenity
synced 2025-05-20 13:55:08 +00:00
Kernel: Custody::absolute_path() should always return "/" for roots
A Custody with no parent is always *a* root (although not necessarily the *real* root.)
This commit is contained in:
parent
485443bfca
commit
944fbf507a
1 changed files with 2 additions and 0 deletions
|
@ -55,6 +55,8 @@ Custody::~Custody()
|
||||||
|
|
||||||
String Custody::absolute_path() const
|
String Custody::absolute_path() const
|
||||||
{
|
{
|
||||||
|
if (!parent())
|
||||||
|
return "/";
|
||||||
Vector<const Custody*, 32> custody_chain;
|
Vector<const Custody*, 32> custody_chain;
|
||||||
for (auto* custody = this; custody; custody = custody->parent())
|
for (auto* custody = this; custody; custody = custody->parent())
|
||||||
custody_chain.append(custody);
|
custody_chain.append(custody);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue