feat(kernel): implement handling symbolic links in paths

Signed-off-by: EnderIce2 <enderice2@protonmail.com>
This commit is contained in:
2025-03-27 14:33:29 +00:00
parent 13d52897b8
commit 7491f19f9a
6 changed files with 58 additions and 3 deletions

View File

@ -113,6 +113,12 @@ namespace Tasking
trace("Setting exe %s to %s",
this->Name, path);
Executable = fs->GetByPath(path, ProcDirectory);
if (Executable->IsSymbolicLink())
{
char buffer[512];
Executable->ReadLink(buffer, sizeof(buffer));
Executable = fs->GetByPath(buffer, Executable->Parent);
}
FileNode *exe = fs->GetByPath("exe", ProcDirectory);
if (exe)
fs->Remove(exe);