Kernel: Directory listing is working again

This commit is contained in:
Bananymous 2023-05-26 22:23:56 +03:00
parent 54d981120d
commit fed690a7f2
1 changed files with 9 additions and 1 deletions

View File

@ -384,7 +384,15 @@ namespace Kernel
open_fd_copy = open_file_description(fd); open_fd_copy = open_file_description(fd);
} }
return TRY(open_fd_copy.inode->read_directory_entries(0)); auto result = TRY(open_fd_copy.inode->read_directory_entries(open_fd_copy.offset));
{
LockGuard _(m_lock);
MUST(validate_fd(fd));
open_file_description(fd).offset = open_fd_copy.offset + 1;
}
return result;
} }
BAN::ErrorOr<BAN::String> Process::working_directory() const BAN::ErrorOr<BAN::String> Process::working_directory() const