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 <fspp/fs_interface/Dir.h>
|
||||||
#include <cpp-utils/system/time.h>
|
#include <cpp-utils/system/time.h>
|
||||||
|
|
||||||
|
// TODO Implement (and test) atime, noatime, strictatime, relatime mount options
|
||||||
|
|
||||||
namespace cryfs {
|
namespace cryfs {
|
||||||
namespace fsblobstore {
|
namespace fsblobstore {
|
||||||
|
|
||||||
@ -43,7 +45,6 @@ namespace cryfs {
|
|||||||
void setLastModificationTime(timespec value);
|
void setLastModificationTime(timespec value);
|
||||||
|
|
||||||
timespec lastMetadataChangeTime() const;
|
timespec lastMetadataChangeTime() const;
|
||||||
void setLastMetadataChangeTime(timespec value);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static size_t _serializedTimeValueSize();
|
static size_t _serializedTimeValueSize();
|
||||||
@ -159,14 +160,11 @@ namespace cryfs {
|
|||||||
|
|
||||||
inline void DirEntry::setLastModificationTime(timespec value) {
|
inline void DirEntry::setLastModificationTime(timespec value) {
|
||||||
_lastModificationTime = value;
|
_lastModificationTime = value;
|
||||||
}
|
_updateLastMetadataChangeTime();
|
||||||
|
|
||||||
inline void DirEntry::setLastMetadataChangeTime(timespec value) {
|
|
||||||
_lastMetadataChangeTime = value;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void DirEntry::_updateLastMetadataChangeTime() {
|
inline void DirEntry::_updateLastMetadataChangeTime() {
|
||||||
setLastMetadataChangeTime(cpputils::time::now());
|
_lastMetadataChangeTime = cpputils::time::now();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user