download.cc: fix path for cached files

This commit is contained in:
Will Dietz 2018-03-22 12:37:20 -05:00
parent 2bc6cfe1ad
commit 59b32403f2

View file

@ -632,7 +632,7 @@ Path Downloader::downloadCached(ref<Store> store, const string & url_, bool unpa
if (expectedHash) { if (expectedHash) {
expectedStorePath = store->makeFixedOutputPath(unpack, expectedHash, name); expectedStorePath = store->makeFixedOutputPath(unpack, expectedHash, name);
if (store->isValidPath(expectedStorePath)) if (store->isValidPath(expectedStorePath))
return expectedStorePath; return store->toRealPath(expectedStorePath);
} }
Path cacheDir = getCacheDir() + "/nix/tarballs"; Path cacheDir = getCacheDir() + "/nix/tarballs";