mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-26 14:28:49 +00:00
Kernel: Update the mtime after a successful InodeFile::write()
Well this was pretty silly. We were not updating the modification time of files.. after modifying them. :^)
This commit is contained in:
parent
708543c3d6
commit
0782c60fe5
Notes:
sideshowbarker
2024-07-19 11:35:01 +09:00
Author: https://github.com/awesomekling
Commit: 0782c60fe5
1 changed files with 4 additions and 1 deletions
|
@ -20,7 +20,10 @@ ssize_t InodeFile::read(FileDescription& description, u8* buffer, ssize_t count)
|
|||
|
||||
ssize_t InodeFile::write(FileDescription& description, const u8* data, ssize_t count)
|
||||
{
|
||||
return m_inode->write_bytes(description.offset(), count, data, &description);
|
||||
ssize_t ret = m_inode->write_bytes(description.offset(), count, data, &description);
|
||||
if (ret > 0)
|
||||
m_inode->set_mtime(kgettimeofday().tv_sec);
|
||||
return ret;
|
||||
}
|
||||
|
||||
KResultOr<Region*> InodeFile::mmap(Process& process, FileDescription& description, VirtualAddress preferred_vaddr, size_t offset, size_t size, int prot)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue