1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-26 11:41:15 +02:00

Revert "Fix 'error 9 while decompressing xz file'"

This reverts commit 78fa47a7f0.
This commit is contained in:
Eelco Dolstra 2019-07-10 19:46:15 +02:00
parent aa739e7839
commit 03f09e1d18
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
7 changed files with 119 additions and 156 deletions

View file

@ -10,8 +10,6 @@
#include "nar-info-disk-cache.hh"
#include "nar-accessor.hh"
#include "json.hh"
#include "retry.hh"
#include "download.hh"
#include <chrono>
@ -81,15 +79,13 @@ void BinaryCacheStore::getFile(const std::string & path, Sink & sink)
std::shared_ptr<std::string> BinaryCacheStore::getFile(const std::string & path)
{
return retry<std::shared_ptr<std::string>>(downloadSettings.tries, [&]() -> std::shared_ptr<std::string> {
StringSink sink;
try {
getFile(path, sink);
} catch (NoSuchBinaryCacheFile &) {
return nullptr;
}
return sink.s;
});
StringSink sink;
try {
getFile(path, sink);
} catch (NoSuchBinaryCacheFile &) {
return nullptr;
}
return sink.s;
}
Path BinaryCacheStore::narInfoFileFor(const Path & storePath)