Merge pull request #1114 from gaul/flush/return-value

Consume return value from FdEntity::Flush
This commit is contained in:
Takeshi Nakatani 2019-08-06 14:12:25 +09:00 committed by GitHub
commit 14d3e12103
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1573,7 +1573,10 @@ static int s3fs_rename(const char* _from, const char* _to)
// flush pending writes if file is open // flush pending writes if file is open
FdEntity *entity = FdManager::get()->ExistOpen(from); FdEntity *entity = FdManager::get()->ExistOpen(from);
if(entity != NULL){ 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); StatCache::getStatCacheData()->DelStat(from);
} }