mirror of
https://github.com/EnderIce2/Fennix.git
synced 2025-07-07 05:19:17 +00:00
Directly return the fs root if the path is "/"
This commit is contained in:
@ -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>();
|
||||
|
Reference in New Issue
Block a user