diff --git a/shared/src/UrlReader.cpp b/shared/src/UrlReader.cpp index 5bd82fe4d1..4b16081fb0 100644 --- a/shared/src/UrlReader.cpp +++ b/shared/src/UrlReader.cpp @@ -54,7 +54,7 @@ bool UrlReader::perform(char const* url, transfer_callback* cb) while (val_ra_size > 0 && str_error == success) cb(0l, 0, 0, this); } - else if (str_error != success) + else if (str_error == success) str_error = curl_easy_strerror(rc); return rc == CURLE_OK; diff --git a/shared/src/UrlReader.h b/shared/src/UrlReader.h index dcd5ff3278..273302bb7e 100644 --- a/shared/src/UrlReader.h +++ b/shared/src/UrlReader.h @@ -164,7 +164,7 @@ inline char const* UrlReader::getError() const { return this->str_error; } inline void UrlReader::setError(char const* static_c_string) { - if (this->str_error != success) + if (this->str_error == success) this->str_error = static_c_string; }