mirror of
https://github.com/RGBCube/serenity
synced 2025-05-30 14:08:10 +00:00
Kernel: Call did_modify_contents()
after truncate()
Truncating a file should absolutly mark it as modified. With this change our `tail` implementation can correctly handle it.
This commit is contained in:
parent
525555181e
commit
5180e41918
3 changed files with 3 additions and 0 deletions
|
@ -96,6 +96,7 @@ ErrorOr<NonnullOwnPtr<KString>> InodeFile::pseudo_path(OpenFileDescription const
|
|||
ErrorOr<void> InodeFile::truncate(u64 size)
|
||||
{
|
||||
TRY(m_inode->truncate(size));
|
||||
// FIXME: Make sure that the timestamps are updated by Inode::truncate for all filesystems before removing this.
|
||||
auto truncated_at = kgettimeofday();
|
||||
TRY(m_inode->update_timestamps({}, truncated_at, truncated_at));
|
||||
return {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue