aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/download.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2019-05-22 23:43:58 +0200
committerEelco Dolstra <edolstra@gmail.com>2019-05-22 23:43:58 +0200
commitf0d6d67af93b63c1da1809dc7630026624c19b14 (patch)
treeda203598db29600c185432bf5631254859e67a5a /src/libstore/download.cc
parentdf3f5a78d5ab0a1f2dc9d288b271b38a9b8b33b5 (diff)
Prevent the global registry from being GC'ed
Issue #2868.
Diffstat (limited to 'src/libstore/download.cc')
-rw-r--r--src/libstore/download.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libstore/download.cc b/src/libstore/download.cc
index a7c2600f6..0d1974d3b 100644
--- a/src/libstore/download.cc
+++ b/src/libstore/download.cc
@@ -913,6 +913,9 @@ CachedDownloadResult Downloader::downloadCached(
url, request.expectedHash.to_string(), gotHash.to_string());
}
+ if (request.gcRoot)
+ store->addIndirectRoot(fileLink);
+
result.storePath = storePath;
result.path = store->toRealPath(storePath);
return result;