Fixed a bug about multipart uploading at no disk free space related to #509

This commit is contained in:
Takeshi Nakatani 2017-04-09 04:37:20 +00:00
parent 79ea1a1561
commit b4c90d6957

View File

@ -3432,8 +3432,13 @@ int S3fsCurl::UploadMultipartPostRequest(const char* tpath, int part_num, const
// request
if(0 == (result = RequestPerform())){
// check etag
if(NULL != strstr(headdata->str(), partdata.etag.c_str())){
headers_t::iterator it = responseHeaders.find("ETag");
if (it != responseHeaders.end()) {
if(S3fsCurl::is_content_md5 && !etag_equals(it->second, partdata.etag)){
result = -1;
}else{
partdata.uploaded = true;
}
}else{
result = -1;
}