From d8328b238db319f3e9cf48f971b807e4f532d0e7 Mon Sep 17 00:00:00 2001 From: Christos Zoulas Date: Fri, 7 Nov 2008 17:25:59 +0000 Subject: [PATCH] when -i don't print application/x-directorybinary. --- src/fsmagic.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/fsmagic.c b/src/fsmagic.c index a974d9e5..e52496c3 100644 --- a/src/fsmagic.c +++ b/src/fsmagic.c @@ -32,7 +32,7 @@ #include "file.h" #ifndef lint -FILE_RCSID("@(#)$File: fsmagic.c,v 1.54 2008/10/18 20:47:48 christos Exp $") +FILE_RCSID("@(#)$File: fsmagic.c,v 1.55 2008/11/04 16:38:28 christos Exp $") #endif /* lint */ #include "magic.h" @@ -88,9 +88,13 @@ bad_link(struct magic_set *ms, int err, char *buf) private int handle_mime(struct magic_set *ms, int mime, const char *str) { - if ((mime & MAGIC_MIME_TYPE) && file_printf(ms, "application/%s", str) - == -1) - return -1; + if ((mime & MAGIC_MIME_TYPE)) { + if (file_printf(ms, "application/%s", str) == -1) + return -1; + if ((mime & MAGIC_MIME_ENCODING) && file_printf(ms, + "; encoding=") == -1) + return -1; + } if ((mime & MAGIC_MIME_ENCODING) && file_printf(ms, "binary") == -1) return -1; return 0; -- 2.40.0