diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2016-07-23 11:14:57 -0700 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2017-08-05 16:41:38 +0000 |
commit | 6c3a3d498a8797c481a394418fff8f7bf1886c61 (patch) | |
tree | b64407f2b2520d46b42f96495c41600aaae03d3c /src/corelib/io/qfilesystemengine.cpp | |
parent | db433bdf65e011e64be51948e79abc02034dddbf (diff) |
Filesystem: Use "birth time" to avoid confusion with Unix ctime
The Unix stat fields "st_ctime" and "st_ctim" mean "change time", the
last time that the file/inode status fields were changed. It does not
mean "creation time". So this commit splits all of the internal API to
"birth" and "metadata change" instead of "creation" to avoid the
conflict.
Change-Id: I149e0540c00745fe8119fffd1463fe78b619649e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/corelib/io/qfilesystemengine.cpp')
-rw-r--r-- | src/corelib/io/qfilesystemengine.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/corelib/io/qfilesystemengine.cpp b/src/corelib/io/qfilesystemengine.cpp index f3205ae6e2..1af5c6f4ed 100644 --- a/src/corelib/io/qfilesystemengine.cpp +++ b/src/corelib/io/qfilesystemengine.cpp @@ -293,15 +293,14 @@ void QFileSystemMetaData::fillFromStatBuf(const QT_STATBUF &statBuffer) #endif // Times + birthTime_ = 0; #if _POSIX_VERSION >= 200809L modificationTime_ = timespecToMSecs(statBuffer.st_mtim); - creationTime_ = timespecToMSecs(statBuffer.st_ctim); - if (!creationTime_) - creationTime_ = modificationTime_; + metadataChangeTime_ = timespecToMSecs(statBuffer.st_ctim); accessTime_ = timespecToMSecs(statBuffer.st_atim); #else - creationTime_ = qint64(statBuffer.st_ctime ? statBuffer.st_ctime : statBuffer.st_mtime) * 1000; modificationTime_ = qint64(statBuffer.st_mtime) * 1000; + metadataChangeTime_ = qint64(statBuffer.st_ctime) * 1000; accessTime_ = qint64(statBuffer.st_atime) * 1000; #endif userId_ = statBuffer.st_uid; |