Fix utimens() behavior: It now updates ctime as well.
This commit is contained in:
parent
3b98fc0390
commit
183b9cf74b
@ -6,6 +6,8 @@
|
||||
#include <fspp/fs_interface/Dir.h>
|
||||
#include <cpp-utils/system/time.h>
|
||||
|
||||
// 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();
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user