From 183b9cf74b5472a55850500e6901ad251067f293 Mon Sep 17 00:00:00 2001 From: Sebastian Messmer Date: Fri, 27 May 2016 17:26:23 -0700 Subject: [PATCH] Fix utimens() behavior: It now updates ctime as well. --- src/cryfs/filesystem/fsblobstore/utils/DirEntry.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/cryfs/filesystem/fsblobstore/utils/DirEntry.h b/src/cryfs/filesystem/fsblobstore/utils/DirEntry.h index 7084b92d..2ff8b617 100644 --- a/src/cryfs/filesystem/fsblobstore/utils/DirEntry.h +++ b/src/cryfs/filesystem/fsblobstore/utils/DirEntry.h @@ -6,6 +6,8 @@ #include #include +// TODO Implement (and test) atime, noatime, strictatime, relatime mount options + namespace cryfs { namespace fsblobstore { @@ -43,7 +45,6 @@ namespace cryfs { void setLastModificationTime(timespec value); timespec lastMetadataChangeTime() const; - void setLastMetadataChangeTime(timespec value); private: static size_t _serializedTimeValueSize(); @@ -159,14 +160,11 @@ namespace cryfs { inline void DirEntry::setLastModificationTime(timespec value) { _lastModificationTime = value; - } - - inline void DirEntry::setLastMetadataChangeTime(timespec value) { - _lastMetadataChangeTime = value; + _updateLastMetadataChangeTime(); } inline void DirEntry::_updateLastMetadataChangeTime() { - setLastMetadataChangeTime(cpputils::time::now()); + _lastMetadataChangeTime = cpputils::time::now(); } }