From 43d14394203c94e572ab9fc4b0ebe01d8e4ae90d Mon Sep 17 00:00:00 2001 From: Andrew Gaul Date: Fri, 2 Aug 2019 09:11:18 -0700 Subject: [PATCH] Consume return value from FdEntity::Flush Found via Coverity. --- src/s3fs.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/s3fs.cpp b/src/s3fs.cpp index 7aee21c..08f81af 100644 --- a/src/s3fs.cpp +++ b/src/s3fs.cpp @@ -1573,7 +1573,10 @@ static int s3fs_rename(const char* _from, const char* _to) // flush pending writes if file is open FdEntity *entity = FdManager::get()->ExistOpen(from); if(entity != NULL){ - entity->Flush(true); + if(0 != (result = entity->Flush(true))){ + S3FS_PRN_ERR("could not upload file(%s): result=%d", to, result); + return result; + } StatCache::getStatCacheData()->DelStat(from); }