mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-27 06:48:49 +00:00
Kernel: ftruncate() should update mtime
This commit is contained in:
parent
1f6c624a1a
commit
e485667201
Notes:
sideshowbarker
2024-07-19 10:15:45 +09:00
Author: https://github.com/awesomekling
Commit: e485667201
1 changed files with 7 additions and 1 deletions
|
@ -50,7 +50,13 @@ String InodeFile::absolute_path(const FileDescription& description) const
|
|||
|
||||
KResult InodeFile::truncate(off_t size)
|
||||
{
|
||||
return m_inode->truncate(size);
|
||||
auto truncate_result = m_inode->truncate(size);
|
||||
if (truncate_result.is_error())
|
||||
return truncate_result;
|
||||
int mtime_result = m_inode->set_mtime(kgettimeofday().tv_sec);
|
||||
if (mtime_result != 0)
|
||||
return KResult(mtime_result);
|
||||
return KSuccess;
|
||||
}
|
||||
|
||||
KResult InodeFile::chown(uid_t uid, gid_t gid)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue