mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-05-28 15:34:33 +00:00
Refactor node creation logic
This commit is contained in:
parent
0d2036139c
commit
42225a5cd9
@ -140,10 +140,9 @@ namespace vfs
|
||||
this->Parent->Children.push_back(this);
|
||||
};
|
||||
|
||||
if (Parent)
|
||||
CreateWithParent(Name, Parent);
|
||||
else if (NoParent)
|
||||
if (NoParent)
|
||||
{
|
||||
Parent = nullptr;
|
||||
const char *Path = Name;
|
||||
|
||||
Node *RootNode = fs->FileSystemRoot->Children[0];
|
||||
@ -211,6 +210,8 @@ namespace vfs
|
||||
delete[] SegmentName;
|
||||
} while (cwk_path_get_next_segment(&segment));
|
||||
}
|
||||
else if (Parent)
|
||||
CreateWithParent(Name, Parent);
|
||||
else
|
||||
{
|
||||
this->Name = new char[strlen(Name) + 1];
|
||||
|
Loading…
x
Reference in New Issue
Block a user