mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:48:11 +00:00
Kernel: ftruncate() should update mtime
This commit is contained in:
parent
1f6c624a1a
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)
|
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)
|
KResult InodeFile::chown(uid_t uid, gid_t gid)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue