aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2020-06-18 19:03:10 +0000
committerJohn Ericson <John.Ericson@Obsidian.Systems>2020-06-18 19:03:10 +0000
commit1b23fe4afb8ed2c41604a1ed19cf3d49c34f46d1 (patch)
tree4c63242a614c65ee90c1f586142330210aa5f429
parentfb432b0bd2b102c42057628e0cce3039ce167810 (diff)
Fix bugs
- Bad dynamic cast target ...classic - std::shared_ptr need explicit deref
-rw-r--r--src/libstore/filetransfer.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstore/filetransfer.cc b/src/libstore/filetransfer.cc
index 9ae682bbb..8b66cbdad 100644
--- a/src/libstore/filetransfer.cc
+++ b/src/libstore/filetransfer.cc
@@ -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;
}