about summary refs log tree commit diff
path: root/src/libstore/download.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore/download.cc')
-rw-r--r--src/libstore/download.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstore/download.cc b/src/libstore/download.cc
index 892c1b21dc02..6ce9525c38de 100644
--- a/src/libstore/download.cc
+++ b/src/libstore/download.cc
@@ -784,7 +784,7 @@ CachedDownloadResult Downloader::downloadCached(
             auto ss = tokenizeString<vector<string>>(readFile(dataFile), "\n");
             if (ss.size() >= 3 && ss[0] == url) {
                 time_t lastChecked;
-                if (string2Int(ss[2], lastChecked) && lastChecked + request.ttl >= time(0)) {
+                if (string2Int(ss[2], lastChecked) && (uint64_t) lastChecked + request.ttl >= (uint64_t) time(0)) {
                     skip = true;
                     result.effectiveUri = request.uri;
                     result.etag = ss[1];