mirror of
https://github.com/NixOS/nix
synced 2025-07-01 12:37:59 +02:00
libarchive proof of concept
This commit is contained in:
parent
3b9c9d34e5
commit
9ff5f6492f
8 changed files with 124 additions and 27 deletions
|
@ -907,7 +907,7 @@ CachedDownloadResult Downloader::downloadCached(
|
|||
printInfo("unpacking '%s'...", url);
|
||||
Path tmpDir = createTempDir();
|
||||
AutoDelete autoDelete(tmpDir, true);
|
||||
unpackTarfile(store->toRealPath(storePath), tmpDir, baseNameOf(url));
|
||||
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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue