mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-05-28 07:24:37 +00:00
Directly return the fs root if the path is "/"
This commit is contained in:
parent
2d03d629dc
commit
e3a544e79c
@ -531,6 +531,14 @@ namespace VirtualFileSystem
|
|||||||
vfsdbg("Opening %s with parent %s", Path, Parent ? Parent->Name : "(null)");
|
vfsdbg("Opening %s with parent %s", Path, Parent ? Parent->Name : "(null)");
|
||||||
const char *basename;
|
const char *basename;
|
||||||
|
|
||||||
|
if (strcmp(Path, "/") == 0)
|
||||||
|
{
|
||||||
|
std::shared_ptr<File> file = std::make_shared<File>();
|
||||||
|
file->node = FileSystemRoot;
|
||||||
|
strcpy(file->Name, "/");
|
||||||
|
return file;
|
||||||
|
}
|
||||||
|
|
||||||
if (strcmp(Path, ".") == 0)
|
if (strcmp(Path, ".") == 0)
|
||||||
{
|
{
|
||||||
std::shared_ptr<File> file = std::make_shared<File>();
|
std::shared_ptr<File> file = std::make_shared<File>();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user