Added cache clearing on upload error

This commit is contained in:
Takeshi Nakatani 2023-03-12 09:39:05 +00:00
parent 4f22354aae
commit abb4649eb4

View File

@ -1446,6 +1446,14 @@ int FdEntity::RowFlush(int fd, const char* tpath, AutoLock::Type type, bool forc
result = RowFlushMultipart(pseudo_obj, tpath);
}
// [NOTE]
// if something went wrong, so if you are using a cache file,
// the cache file may not be correct. So delete cache files.
//
if(0 != result && !cachepath.empty()){
FdManager::DeleteCacheFile(tpath);
}
return result;
}