fix utimes() st_ctime if struct utimbuf buf wasn't NULL (Carmelo Viavattene, Szaka)
parent
3e602f753e
commit
028f73740d
|
@ -1188,6 +1188,7 @@ static int ntfs_fuse_rmdir(const char *path)
|
|||
static int ntfs_fuse_utime(const char *path, struct utimbuf *buf)
|
||||
{
|
||||
ntfs_inode *ni;
|
||||
time_t now;
|
||||
int res = 0;
|
||||
|
||||
if (ntfs_fuse_is_named_data_stream(path))
|
||||
|
@ -1198,17 +1199,15 @@ static int ntfs_fuse_utime(const char *path, struct utimbuf *buf)
|
|||
|
||||
NInoSetNoParentMtimeUpdate(ni);
|
||||
|
||||
now = time(NULL);
|
||||
ni->last_mft_change_time = now;
|
||||
|
||||
if (buf) {
|
||||
ni->last_access_time = buf->actime;
|
||||
ni->last_data_change_time = buf->modtime;
|
||||
ni->last_mft_change_time = buf->modtime;
|
||||
} else {
|
||||
time_t now;
|
||||
|
||||
now = time(NULL);
|
||||
ni->last_access_time = now;
|
||||
ni->last_data_change_time = now;
|
||||
ni->last_mft_change_time = now;
|
||||
}
|
||||
NInoFileNameSetDirty(ni);
|
||||
NInoSetDirty(ni);
|
||||
|
|
Loading…
Reference in New Issue