From 107679913a6c9f55a4f8c6043d546cfbcdddfaea Mon Sep 17 00:00:00 2001 From: bi4k8 Date: Tue, 18 Apr 2023 16:25:15 +0000 Subject: [PATCH] fitz/unzip: mention name of missing zip entry Otherwise, this information is lost, and it's useful to know which path was not found when debugging a broken file. --- source/fitz/unzip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/fitz/unzip.c b/source/fitz/unzip.c index 78cf989d75..bb7c97b3e2 100644 --- a/source/fitz/unzip.c +++ b/source/fitz/unzip.c @@ -302,7 +302,7 @@ static fz_stream *open_zip_entry(fz_context *ctx, fz_archive *arch, const char * ent = lookup_zip_entry(ctx, zip, name); if (!ent) - fz_throw(ctx, FZ_ERROR_GENERIC, "cannot find named zip archive entry"); + fz_throw(ctx, FZ_ERROR_GENERIC, "cannot find named zip archive entry '%s'", name); method = read_zip_entry_header(ctx, zip, ent); if (method == 0) @@ -328,7 +328,7 @@ static fz_buffer *read_zip_entry(fz_context *ctx, fz_archive *arch, const char * ent = lookup_zip_entry(ctx, zip, name); if (!ent) - fz_throw(ctx, FZ_ERROR_GENERIC, "cannot find named zip archive entry"); + fz_throw(ctx, FZ_ERROR_GENERIC, "cannot find named zip archive entry '%s'", name); method = read_zip_entry_header(ctx, zip, ent); ubuf = fz_new_buffer(ctx, ent->usize + 1); /* +1 because many callers will add a terminating zero */