mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-27 14:58:46 +00:00
Kernel: Try to set [cm]time in Inode::did_modify_contents
This indirectly resolves a fixme in sys$msync
This commit is contained in:
parent
10d9bb93be
commit
c3e57bfccb
Notes:
sideshowbarker
2024-07-17 23:02:37 +09:00
Author: https://github.com/Hendiadyoin1
Commit: c3e57bfccb
Pull-request: https://github.com/SerenityOS/serenity/pull/14326
Issue: https://github.com/SerenityOS/serenity/issues/14266
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/timschumi ✅
2 changed files with 6 additions and 1 deletions
|
@ -232,6 +232,12 @@ void Inode::did_remove_child(InodeIdentifier, StringView name)
|
|||
|
||||
void Inode::did_modify_contents()
|
||||
{
|
||||
// FIXME: What happens if this fails?
|
||||
// ENOTIMPL would be a meaningless error to return here
|
||||
auto time = kgettimeofday().to_truncated_seconds();
|
||||
(void)set_mtime(time);
|
||||
(void)set_ctime(time);
|
||||
|
||||
m_watchers.for_each([&](auto& watcher) {
|
||||
watcher->notify_inode_event({}, identifier(), InodeWatcherEvent::Type::ContentModified);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue