Added cache clearing on upload error (#2127)
This commit is contained in:
parent
4f22354aae
commit
18495c44aa
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue