From 9648eba5bb4dbac8cd919e236c037fc5ea87c48f Mon Sep 17 00:00:00 2001 From: Takeshi Nakatani Date: Tue, 21 Mar 2023 14:15:34 +0900 Subject: [PATCH] Changed to rename cache files when renaming large files (#2135) --- src/s3fs.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/s3fs.cpp b/src/s3fs.cpp index ce9014c..3d3eeae 100644 --- a/src/s3fs.cpp +++ b/src/s3fs.cpp @@ -1518,11 +1518,14 @@ static int rename_large_object(const char* from, const char* to) } s3fscurl.DestroyCurlHandle(); + // Rename cache file + FdManager::get()->Rename(from, to); + // Remove file result = s3fs_unlink(from); + // Stats StatCache::getStatCacheData()->DelStat(to); - FdManager::DeleteCacheFile(to); return result; }