mirror of
https://github.com/EnderIce2/Fennix.git
synced 2025-07-01 18:39:16 +00:00
feat(kernel): implement handling symbolic links in paths
Signed-off-by: EnderIce2 <enderice2@protonmail.com>
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user