forked from lix-project/lix
Fix bugs
- Bad dynamic cast target ...classic - std::shared_ptr need explicit deref
This commit is contained in:
parent
fb432b0bd2
commit
1b23fe4afb
|
@ -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