mirror of
https://github.com/RGBCube/serenity
synced 2025-07-02 02:32:07 +00:00
Kernel: Update the ".." inode for directories after a rename
Because the ".." entry in a directory is a separate inode, if a directory is renamed to a new location, then we should update this entry the point to the new parent directory as well. Co-authored-by: Liav A <liavalb@gmail.com>
This commit is contained in:
parent
2b246d980a
commit
3b03077abb
18 changed files with 128 additions and 0 deletions
|
@ -102,6 +102,12 @@ ErrorOr<NonnullOwnPtr<KBuffer>> FATInode::read_block_list()
|
|||
return blocks.release_nonnull();
|
||||
}
|
||||
|
||||
ErrorOr<void> FATInode::replace_child(StringView, Inode&)
|
||||
{
|
||||
// TODO: Implement this once we have write support.
|
||||
return Error::from_errno(EROFS);
|
||||
}
|
||||
|
||||
ErrorOr<LockRefPtr<FATInode>> FATInode::traverse(Function<ErrorOr<bool>(LockRefPtr<FATInode>)> callback)
|
||||
{
|
||||
VERIFY(has_flag(m_entry.attributes, FATAttributes::Directory));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue