diff --git a/src/libstore/download.cc b/src/libstore/download.cc index cdf56e09d..8fe278d02 100644 --- a/src/libstore/download.cc +++ b/src/libstore/download.cc @@ -34,6 +34,10 @@ DownloadSettings downloadSettings; static GlobalConfig::Register r1(&downloadSettings); +CachedDownloadRequest::CachedDownloadRequest(const std::string & uri) + : uri(uri), ttl(settings.tarballTtl) +{ } + std::string resolveUri(const std::string & uri) { if (uri.compare(0, 8, "channel:") == 0) diff --git a/src/libstore/download.hh b/src/libstore/download.hh index 68565bf46..5a131c704 100644 --- a/src/libstore/download.hh +++ b/src/libstore/download.hh @@ -2,7 +2,7 @@ #include "types.hh" #include "hash.hh" -#include "globals.hh" +#include "config.hh" #include #include @@ -71,10 +71,10 @@ struct CachedDownloadRequest bool unpack = false; std::string name; Hash expectedHash; - unsigned int ttl = settings.tarballTtl; + unsigned int ttl; - CachedDownloadRequest(const std::string & uri) - : uri(uri) { } + CachedDownloadRequest(const std::string & uri); + CachedDownloadRequest() = delete; }; struct CachedDownloadResult