1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-12-16 22:11:05 +01:00

Merge pull request #14780 from NixOS/tarfile-warning

libutil/tarfile: Mention pathname in warning
This commit is contained in:
tomberek 2025-12-13 03:06:09 +00:00 committed by GitHub
commit 26b86a02db
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -136,7 +136,7 @@ static void extract_archive(TarArchive & archive, const std::filesystem::path &
if (!name)
throw Error("cannot get archive member name: %s", archive_error_string(archive.archive));
if (r == ARCHIVE_WARN)
warn(archive_error_string(archive.archive));
warn("getting archive member '%1%': %2%", name, archive_error_string(archive.archive));
else
archive.check(r);
@ -193,7 +193,7 @@ time_t unpackTarfileToSink(TarArchive & archive, ExtendedFileSystemObjectSink &
throw Error("cannot get archive member name: %s", archive_error_string(archive.archive));
auto cpath = CanonPath{path};
if (r == ARCHIVE_WARN)
warn(archive_error_string(archive.archive));
warn("getting archive member '%1%': %2%", path, archive_error_string(archive.archive));
else
archive.check(r);