mirror of
https://github.com/NixOS/nix
synced 2025-06-25 02:21:16 +02:00
Improve 'cannot read file from tarball' error
It now says e.g. error: cannot read file from tarball: Truncated tar archive detected while reading data
This commit is contained in:
parent
ed521760bc
commit
bdb3f613dd
1 changed files with 1 additions and 1 deletions
|
@ -215,7 +215,7 @@ time_t unpackTarfileToSink(TarArchive & archive, ExtendedFileSystemObjectSink &
|
|||
std::vector<unsigned char> buf(128 * 1024);
|
||||
auto n = archive_read_data(archive.archive, buf.data(), buf.size());
|
||||
if (n < 0)
|
||||
throw Error("cannot read file '%s' from tarball", path);
|
||||
checkLibArchive(archive.archive, n, "cannot read file from tarball: %s");
|
||||
if (n == 0)
|
||||
break;
|
||||
crf(std::string_view{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue