mirror of
https://github.com/EnderIce2/Fennix.git
synced 2025-07-12 15:59:17 +00:00
Fix driver implementation
This commit is contained in:
@ -28,24 +28,19 @@ void cmd_cd(const char *args)
|
||||
if (args[0] == '\0')
|
||||
return;
|
||||
|
||||
/* FIXME: Reimplement this later */
|
||||
assert(!"Function not implemented");
|
||||
// Node *thisNode = fs->GetByPath(args, thisProcess->CWD, true);
|
||||
FileNode *node = fs->GetByPath(args, nullptr);
|
||||
|
||||
// if (thisNode == nullptr)
|
||||
// {
|
||||
// printf("cd: %s: No such file or directory\n", args);
|
||||
// return;
|
||||
// }
|
||||
if (node == nullptr)
|
||||
{
|
||||
printf("cd: %s: No such file or directory\n", args);
|
||||
return;
|
||||
}
|
||||
|
||||
// if (thisNode->Stat.IsType(SYMLINK))
|
||||
// thisNode = fs->GetByPath(thisNode->GetSymLink(), nullptr, true);
|
||||
if (!node->IsDirectory())
|
||||
{
|
||||
printf("cd: %s: Not a directory\n", args);
|
||||
return;
|
||||
}
|
||||
|
||||
// if (!thisNode->Stat.IsType(DIRECTORY))
|
||||
// {
|
||||
// printf("cd: %s: Not a directory\n", args);
|
||||
// return;
|
||||
// }
|
||||
|
||||
// thisProcess->CWD = thisNode;
|
||||
thisProcess->CWD = node;
|
||||
}
|
||||
|
Reference in New Issue
Block a user