diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2020-02-02 12:28:56 +0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2020-02-02 12:28:56 +0100 |
commit | 7bcc9f2aaf87a08a7570610f45e99754fd74d3f6 (patch) | |
tree | bc6c7346e730783bf1da15d99ce26247cc94668e /src/libstore/download.cc | |
parent | 958ec5de568904a07ef050418088d882cbf2ea61 (diff) |
Add convenience overload for toRealPath()
Diffstat (limited to 'src/libstore/download.cc')
-rw-r--r-- | src/libstore/download.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstore/download.cc b/src/libstore/download.cc index 681b74240..d8c52b151 100644 --- a/src/libstore/download.cc +++ b/src/libstore/download.cc @@ -910,7 +910,7 @@ CachedDownloadResult Downloader::downloadCached( printInfo("unpacking '%s'...", url); Path tmpDir = createTempDir(); AutoDelete autoDelete(tmpDir, true); - unpackTarfile(store->toRealPath(store->printStorePath(*storePath)), tmpDir); + unpackTarfile(store->toRealPath(*storePath), tmpDir); auto members = readDirectory(tmpDir); if (members.size() != 1) throw nix::Error("tarball '%s' contains an unexpected number of top-level files", url); @@ -928,8 +928,8 @@ CachedDownloadResult Downloader::downloadCached( if (expectedStorePath && *storePath != *expectedStorePath) { unsigned int statusCode = 102; Hash gotHash = request.unpack - ? hashPath(request.expectedHash.type, store->toRealPath(store->printStorePath(*storePath))).first - : hashFile(request.expectedHash.type, store->toRealPath(store->printStorePath(*storePath))); + ? hashPath(request.expectedHash.type, store->toRealPath(*storePath)).first + : hashFile(request.expectedHash.type, store->toRealPath(*storePath)); throw nix::Error(statusCode, "hash mismatch in file downloaded from '%s':\n wanted: %s\n got: %s", url, request.expectedHash.to_string(), gotHash.to_string()); } |