mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-05-27 15:04:33 +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)");
|
||||
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)
|
||||
{
|
||||
std::shared_ptr<File> file = std::make_shared<File>();
|
||||
|
Loading…
x
Reference in New Issue
Block a user