1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-22 02:09:36 +01:00

libstore/filetransfer: Rename writeException -> callbackException

This commit is contained in:
Sergei Zimmerman 2025-11-19 01:31:41 +03:00
parent 6d65f8eea2
commit e704b8eeed
No known key found for this signature in database

View file

@ -168,7 +168,7 @@ struct curlFileTransfer : public FileTransfer
std::shared_ptr<FinishSink> decompressionSink;
std::optional<StringSink> errorSink;
std::exception_ptr writeException;
std::exception_ptr callbackException;
size_t writeCallback(void * contents, size_t size, size_t nmemb) noexcept
try {
@ -190,7 +190,7 @@ struct curlFileTransfer : public FileTransfer
return realSize;
} catch (...) {
writeException = std::current_exception();
callbackException = std::current_exception();
return 0;
}
@ -474,7 +474,7 @@ struct curlFileTransfer : public FileTransfer
try {
decompressionSink->finish();
} catch (...) {
writeException = std::current_exception();
callbackException = std::current_exception();
}
}
@ -483,8 +483,8 @@ struct curlFileTransfer : public FileTransfer
httpStatus = 304;
}
if (writeException)
failEx(writeException);
if (callbackException)
failEx(callbackException);
else if (code == CURLE_OK && successfulStatuses.count(httpStatus)) {
result.cached = httpStatus == 304;