mirror of
https://github.com/NixOS/nix
synced 2025-06-25 14:51:16 +02:00
Make 'nix copy' to file:// binary caches run in constant memory
This commit is contained in:
parent
400f1a9b59
commit
fc84c358d9
9 changed files with 120 additions and 87 deletions
|
@ -100,11 +100,11 @@ protected:
|
|||
}
|
||||
|
||||
void upsertFile(const std::string & path,
|
||||
const std::string & data,
|
||||
Source & source,
|
||||
const std::string & mimeType) override
|
||||
{
|
||||
auto req = FileTransferRequest(cacheUri + "/" + path);
|
||||
req.data = std::make_shared<string>(data); // FIXME: inefficient
|
||||
req.data = std::make_shared<string>(source.drain());
|
||||
req.mimeType = mimeType;
|
||||
try {
|
||||
getFileTransfer()->upload(req);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue