From 9abe3fa662496bc814c89958146b06bb51c280e0 Mon Sep 17 00:00:00 2001 From: Andrew Gaul Date: Sun, 9 May 2021 13:44:12 +0900 Subject: [PATCH] Use same time when creating directory objects (#1652) This avoids mismatched times and is slightly faster. --- src/s3fs.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/s3fs.cpp b/src/s3fs.cpp index 28c9a78..545af37 100644 --- a/src/s3fs.cpp +++ b/src/s3fs.cpp @@ -1045,7 +1045,8 @@ static int s3fs_mkdir(const char* _path, mode_t mode) } return result; } - result = create_directory_object(path, mode, time(NULL), time(NULL), time(NULL), pcxt->uid, pcxt->gid); + time_t now = time(NULL); + result = create_directory_object(path, mode, now, now, now, pcxt->uid, pcxt->gid); StatCache::getStatCacheData()->DelStat(path); S3FS_MALLOCTRIM(0);