Fix broken uploadProgressCallback closure
Since the callback is global we can't refer to 'path' in it. This could cause a segfault or printing of arbitrary data.
This commit is contained in:
parent
056c3fbbfc
commit
0163e8928c
1 changed files with 4 additions and 4 deletions
|
@ -269,14 +269,14 @@ struct S3BinaryCacheStoreImpl : public S3BinaryCacheStore
|
||||||
transferConfig.bufferSize = bufferSize;
|
transferConfig.bufferSize = bufferSize;
|
||||||
|
|
||||||
transferConfig.uploadProgressCallback =
|
transferConfig.uploadProgressCallback =
|
||||||
[&](const TransferManager *transferManager,
|
[](const TransferManager *transferManager,
|
||||||
const std::shared_ptr<const TransferHandle>
|
const std::shared_ptr<const TransferHandle>
|
||||||
&transferHandle)
|
&transferHandle)
|
||||||
{
|
{
|
||||||
//FIXME: find a way to properly abort the multipart upload.
|
//FIXME: find a way to properly abort the multipart upload.
|
||||||
//checkInterrupt();
|
//checkInterrupt();
|
||||||
debug("upload progress ('%s'): '%d' of '%d' bytes",
|
debug("upload progress ('%s'): '%d' of '%d' bytes",
|
||||||
path,
|
transferHandle->GetKey(),
|
||||||
transferHandle->GetBytesTransferred(),
|
transferHandle->GetBytesTransferred(),
|
||||||
transferHandle->GetBytesTotalSize());
|
transferHandle->GetBytesTotalSize());
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue