Fix remove if not found in Sia
This commit is contained in:
@@ -260,7 +260,9 @@ private:
|
||||
public:
|
||||
virtual SString GetSingleLineMessage() const override
|
||||
{
|
||||
return L"FailedToRemoveFileFromSia|SP|" + _siaPath + L"|FP|" + _filePath;
|
||||
return L"FailedToRemoveFileFromSia|SP|" + _siaPath +
|
||||
L"|FP|" + _filePath +
|
||||
L"|CERR|" + _curlError.GetReason();
|
||||
}
|
||||
|
||||
virtual std::shared_ptr<CEvent> Clone() const override
|
||||
|
@@ -159,7 +159,7 @@ SiaCurlError CSiaCurl::ProcessResponse(const int& res, const int& httpCode, cons
|
||||
}
|
||||
else if (httpCode)
|
||||
{
|
||||
ret = { SiaCurlErrorCode::HttpError, GetApiErrorMessage(result) };
|
||||
ret = { SiaCurlErrorCode::HttpError, SString::FromInt32(httpCode) + ":" + (result.length() ? GetApiErrorMessage(json::parse(result.c_str())) : "") };
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -125,7 +125,7 @@ bool CUploadManager::HandleFileRemove(const CSiaCurl& siaCurl, const SString& si
|
||||
|
||||
json response;
|
||||
SiaCurlError cerror = siaCurl.Post(SString(L"/renter/delete/") + siaPath, {}, response);
|
||||
if (ApiSuccess(cerror))
|
||||
if (ApiSuccess(cerror) || cerror.GetReason().Contains("no file known"))
|
||||
{
|
||||
SQLite::Statement del(_uploadDatabase, DELETE_UPLOAD);
|
||||
del.bind("@sia_path", SString::ToUtf8(siaPath).c_str());
|
||||
|
Reference in New Issue
Block a user