mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-10 16:26:18 +02:00
Fix bugs
- Bad dynamic cast target ...classic - std::shared_ptr need explicit deref
This commit is contained in:
parent
fb432b0bd2
commit
1b23fe4afb
1 changed files with 2 additions and 2 deletions
|
@ -420,7 +420,7 @@ struct curlFileTransfer : public FileTransfer
|
|||
|
||||
std::shared_ptr<std::string> response;
|
||||
if (decompressionSink)
|
||||
if (auto teeSink = std::dynamic_pointer_cast<TeeSink<std::shared_ptr<CompressionSink>>>(decompressionSink))
|
||||
if (auto teeSink = std::dynamic_pointer_cast<TeeSink<ref<CompressionSink>>>(decompressionSink))
|
||||
response = teeSink->data;
|
||||
auto exc =
|
||||
code == CURLE_ABORTED_BY_CALLBACK && _isInterrupted
|
||||
|
@ -837,7 +837,7 @@ FileTransferError::FileTransferError(FileTransfer::Error error, std::shared_ptr<
|
|||
{
|
||||
const auto hf = hintfmt(args...);
|
||||
if (response) {
|
||||
err.hint = hintfmt("%1%\n\nresponse body:\n\n%2%", normaltxt(hf.str()), response);
|
||||
err.hint = hintfmt("%1%\n\nresponse body:\n\n%2%", normaltxt(hf.str()), *response);
|
||||
} else {
|
||||
err.hint = hf;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue