mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-24 02:09:28 +00:00
Refactor FS::find_parent_of_inode() into Inode::parent().
This way, Ext2FSInode can cache its parent inode index. This makes absolute path lookups dramatically faster. SynthFSInode is also simplified greatly.
This commit is contained in:
@@ -346,7 +346,7 @@ String VFS::absolute_path(Inode& core_inode)
|
||||
if (inode->is_directory()) {
|
||||
parent_id = resolve_path("..", inode->identifier(), error);
|
||||
} else {
|
||||
parent_id = inode->fs().find_parent_of_inode(inode->identifier());
|
||||
parent_id = inode->parent()->identifier();
|
||||
}
|
||||
ASSERT(parent_id.is_valid());
|
||||
inode = get_inode(parent_id);
|
||||
|
||||
Reference in New Issue
Block a user