diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2022-02-07 10:48:57 +0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2022-02-07 10:53:47 +0100 |
commit | 97e02c23bde0515540c63081824f85ff1cebd86f (patch) | |
tree | d0291b12440f31abc7498e30a0d81174daa84353 /src/libstore | |
parent | 4369771870b3945f95e1468a0803696034d506b7 (diff) |
Fix 'basic_string::_M_construct null not valid' in interrupted download
Fixes #5985.
Diffstat (limited to 'src/libstore')
-rw-r--r-- | src/libstore/filetransfer.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstore/filetransfer.cc b/src/libstore/filetransfer.cc index 6b62311cf..76fed11db 100644 --- a/src/libstore/filetransfer.cc +++ b/src/libstore/filetransfer.cc @@ -128,7 +128,7 @@ struct curlFileTransfer : public FileTransfer if (requestHeaders) curl_slist_free_all(requestHeaders); try { if (!done) - fail(FileTransferError(Interrupted, nullptr, "download of '%s' was interrupted", request.uri)); + fail(FileTransferError(Interrupted, {}, "download of '%s' was interrupted", request.uri)); } catch (...) { ignoreException(); } @@ -704,7 +704,7 @@ struct curlFileTransfer : public FileTransfer auto s3Res = s3Helper.getObject(bucketName, key); FileTransferResult res; if (!s3Res.data) - throw FileTransferError(NotFound, nullptr, "S3 object '%s' does not exist", request.uri); + throw FileTransferError(NotFound, {}, "S3 object '%s' does not exist", request.uri); res.data = std::move(*s3Res.data); callback(std::move(res)); #else |