mirror of
https://github.com/NixOS/nix.git
synced 2025-11-09 03:56:01 +01:00
Merge pull request #13173 from NixOS/better-truncated-tar-error
Improve 'cannot read file from tarball' error
This commit is contained in:
commit
1ac4bf122b
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);
|
std::vector<unsigned char> buf(128 * 1024);
|
||||||
auto n = archive_read_data(archive.archive, buf.data(), buf.size());
|
auto n = archive_read_data(archive.archive, buf.data(), buf.size());
|
||||||
if (n < 0)
|
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)
|
if (n == 0)
|
||||||
break;
|
break;
|
||||||
crf(std::string_view{
|
crf(std::string_view{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue