mirror of
https://github.com/EnderIce2/Fennix.git
synced 2025-05-28 15:34:31 +00:00
fix(kernel/vfs): correct root assignment logic in filesystem
This commit is contained in:
parent
d4346202ca
commit
2d2d28689c
@ -43,7 +43,6 @@ namespace vfs
|
|||||||
if (Index >= FileSystemRoots->Children.size())
|
if (Index >= FileSystemRoots->Children.size())
|
||||||
FileSystemRoots->Children.resize(Index + 1);
|
FileSystemRoots->Children.resize(Index + 1);
|
||||||
|
|
||||||
FileSystemRoots->Children[Index] = Root;
|
|
||||||
if (FileSystemRoots->Children[Index] == nullptr)
|
if (FileSystemRoots->Children[Index] == nullptr)
|
||||||
FileSystemRoots->Children[Index] = Root;
|
FileSystemRoots->Children[Index] = Root;
|
||||||
else
|
else
|
||||||
@ -56,7 +55,10 @@ namespace vfs
|
|||||||
assert(Index < FileSystemRoots->Children.size());
|
assert(Index < FileSystemRoots->Children.size());
|
||||||
|
|
||||||
if (FileSystemRoots->Children[Index] != nullptr)
|
if (FileSystemRoots->Children[Index] != nullptr)
|
||||||
|
{
|
||||||
|
debug("Root %ld already exists", Index);
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
FileSystemRoots->Children[Index] = Root;
|
FileSystemRoots->Children[Index] = Root;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user