summaryrefslogtreecommitdiffstats
path: root/src/libstore/download.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2019-12-20 12:45:58 +0100
committerEelco Dolstra <edolstra@gmail.com>2019-12-20 12:45:58 +0100
commitc7866733d7ce2836fbb43de90dd64d17b0d20753 (patch)
tree9907c5fe6e57cc882c4fcf729f05e6620da37219 /src/libstore/download.cc
parent4da1cd59ba0c371349d3fa86e3b0b6758a0a427f (diff)
parentc84c843e3360459cf2c993919fb9f89474a46f38 (diff)
Merge remote-tracking branch 'origin/master' into flakes
Diffstat (limited to 'src/libstore/download.cc')
-rw-r--r--src/libstore/download.cc7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/libstore/download.cc b/src/libstore/download.cc
index 83737b307..681b74240 100644
--- a/src/libstore/download.cc
+++ b/src/libstore/download.cc
@@ -910,12 +910,7 @@ CachedDownloadResult Downloader::downloadCached(
printInfo("unpacking '%s'...", url);
Path tmpDir = createTempDir();
AutoDelete autoDelete(tmpDir, true);
-#if 0
- unpackTarfile(store->toRealPath(store->printStorePath(*storePath)), tmpDir, std::string(baseNameOf(url)));
-#else
- // FIXME: this requires GNU tar for decompression.
- runProgram("tar", true, {"xf", store->toRealPath(store->printStorePath(*storePath)), "-C", tmpDir});
-#endif
+ unpackTarfile(store->toRealPath(store->printStorePath(*storePath)), tmpDir);
auto members = readDirectory(tmpDir);
if (members.size() != 1)
throw nix::Error("tarball '%s' contains an unexpected number of top-level files", url);