diff --git a/src/s3fs.cpp b/src/s3fs.cpp index 6f127e0..c74c902 100644 --- a/src/s3fs.cpp +++ b/src/s3fs.cpp @@ -592,6 +592,7 @@ int get_local_fd(const char* path) { // make the file's mtime match that of the file on s3 struct utimbuf n_mtime; n_mtime.modtime = strtoul(responseHeaders["x-amz-meta-mtime"].c_str(), (char **) NULL, 10); + n_mtime.actime = n_mtime.modtime; if((utime(cache_path.c_str(), &n_mtime)) == -1) { YIKES(-errno); } @@ -687,6 +688,7 @@ static int put_headers(const char *path, headers_t meta) { if((stat(cache_path.c_str(), &st)) == 0) { n_mtime.modtime = strtoul(meta["x-amz-meta-mtime"].c_str(), (char **) NULL, 10); + n_mtime.actime = n_mtime.modtime; if((utime(cache_path.c_str(), &n_mtime)) == -1) { YIKES(-errno); } @@ -2403,6 +2405,7 @@ static int s3fs_flush(const char *path, struct fuse_file_info *fi) { if((stat(cache_path.c_str(), &st)) == 0) { n_mtime.modtime = strtoul(meta["x-amz-meta-mtime"].c_str(), (char **) NULL, 10); + n_mtime.actime = n_mtime.modtime; if((utime(cache_path.c_str(), &n_mtime)) == -1) { YIKES(-errno); }