Subject: Make the default case print something sane for each of the different styles: (...) Origin: FILE5_25-9-g9039ec5 Upstream-Author: Christos Zoulas Date: Thu Sep 17 01:10:51 2015 +0000 Make the default case print something sane for each of the different styles: apple, mime, encoding, default. Before it just printed data which is confusing. --- a/src/funcs.c +++ b/src/funcs.c @@ -293,9 +293,18 @@ simple: /* give up */ m = 1; - if ((!mime || (mime & MAGIC_MIME_TYPE)) && - file_printf(ms, "%s", mime ? type : def) == -1) { - rv = -1; + if (ms->flags & MAGIC_MIME) { + if (file_printf(ms, "%s", type) == -1) + rv = -1; + } else if (ms->flags & MAGIC_APPLE) { + if (file_printf(ms, "UNKNUNKN") == -1) + rv = -1; + } else if (ms->flags & MAGIC_EXTENSION) { + if (file_printf(ms, "???") == -1) + rv = -1; + } else { + if (file_printf(ms, "%s", def) == -1) + rv = -1; } done: if ((ms->flags & MAGIC_MIME_ENCODING) != 0) {