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

@ -100,6 +100,12 @@ namespace Execute
BinaryType GetBinaryType(std::string Path)
{
FileNode *node = fs->GetByPath(Path.c_str(), nullptr);
if (node->IsSymbolicLink())
{
char buffer[512];
node->ReadLink(buffer, sizeof(buffer));
node = fs->GetByPath(buffer, node->Parent);
}
debug("Checking binary type of %s (returning %p)", Path.c_str(), node);
assert(node != nullptr);
return GetBinaryType(node);