From 9cc00c562369fe0b9149eb2aeee090cf52167285 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sun, 14 Jan 2018 13:07:17 -0800 Subject: Check for gzipped files even if we don't have libz. If we aren't built with libz, report a new "decompression not supported" error if the file is gzipped; the problem isn't that it's a new capture file format we don't support, it's that a *compressed* capture file, in some format, but we don't support the *compression* format used. This can be extended if we add support for other compression formats. Change-Id: I19239525d4e02357e3ca7189996556839af8fce2 Reviewed-on: https://code.wireshark.org/review/25315 Reviewed-by: Guy Harris --- ui/capture.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'ui/capture.c') diff --git a/ui/capture.c b/ui/capture.c index 90cc169d9b..cc4b09127e 100644 --- a/ui/capture.c +++ b/ui/capture.c @@ -377,6 +377,14 @@ cf_open_error_message(int err, gchar *err_info, gboolean for_writing, errmsg = errmsg_errno; break; + case WTAP_ERR_DECOMPRESSION_NOT_SUPPORTED: + g_snprintf(errmsg_errno, sizeof(errmsg_errno), + "We don't support the form of compression used by the compressed file \"%%s\".\n" + "(%s)", err_info != NULL ? err_info : "no information supplied"); + g_free(err_info); + errmsg = errmsg_errno; + break; + default: g_snprintf(errmsg_errno, sizeof(errmsg_errno), "The file \"%%s\" could not be %s: %s.", -- cgit v1.2.3