diff options
author | Guy Harris <guy@alum.mit.edu> | 2018-01-14 13:07:17 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2018-01-14 21:08:18 +0000 |
commit | 9cc00c562369fe0b9149eb2aeee090cf52167285 (patch) | |
tree | 00f52bc3c14ae31681d6e6b931b3f942f9bcebfa /ui/alert_box.c | |
parent | c3190d9d70febdd1dbc15269e970f32aeda33f76 (diff) |
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 <guy@alum.mit.edu>
Diffstat (limited to 'ui/alert_box.c')
-rw-r--r-- | ui/alert_box.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/ui/alert_box.c b/ui/alert_box.c index d387dacb8d..907a04a81a 100644 --- a/ui/alert_box.c +++ b/ui/alert_box.c @@ -143,6 +143,14 @@ cfile_open_failure_alert_box(const char *filename, int err, gchar *err_info) g_free(err_info); break; + case WTAP_ERR_DECOMPRESSION_NOT_SUPPORTED: + simple_error_message_box( + "The file \"%s\" cannot be decompressed; it is compressed in a way that we don't support.\n" + "(%s)", display_basename, + err_info != NULL ? err_info : "no information supplied"); + g_free(err_info); + break; + default: simple_error_message_box( "The file \"%s\" could not be opened: %s.", @@ -295,6 +303,15 @@ cfile_read_failure_alert_box(const char *filename, int err, gchar *err_info) g_free(err_info); break; + case WTAP_ERR_DECOMPRESSION_NOT_SUPPORTED: + simple_error_message_box( + "The %s cannot be decompressed; it is compressed in a way that we don't support.\n" + "(%s)", + display_name, + err_info != NULL ? err_info : "no information supplied"); + g_free(err_info); + break; + default: simple_error_message_box( "An error occurred while reading the %s: %s.", |