From: Christos Zoulas Date: Tue, 16 Jul 2019 13:30:32 +0000 (+0000) Subject: Fix device handling on --apple (Christoph Biedl) X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5eff9dd8e5cc56f8c1ecb2fc47f9bbdef2dfa226;p=file Fix device handling on --apple (Christoph Biedl) --- diff --git a/src/fsmagic.c b/src/fsmagic.c index 25c4f811..5204f20d 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.80 2019/04/23 18:59:27 christos Exp $") +FILE_RCSID("@(#)$File: fsmagic.c,v 1.81 2019/07/16 13:30:32 christos Exp $") #endif /* lint */ #include "magic.h" @@ -425,5 +425,11 @@ file_fsmagic(struct magic_set *ms, const char *fn, struct stat *sb) if (file_printf(ms, " ") == -1) return -1; } + /* + * If we were looking for extensions or apple (silent) it is not our + * job to print here, so don't count this as a match. + */ + if (ret == 1 && silent) + return 0; return ret; }