]> granicus.if.org Git - file/commitdiff
Fix device handling on --apple (Christoph Biedl)
authorChristos Zoulas <christos@zoulas.com>
Tue, 16 Jul 2019 13:30:32 +0000 (13:30 +0000)
committerChristos Zoulas <christos@zoulas.com>
Tue, 16 Jul 2019 13:30:32 +0000 (13:30 +0000)
src/fsmagic.c

index 25c4f811567f47273707bf1d556b624c2931b2cc..5204f20d0cdbde554f38e84c7b242d10cfef6b0c 100644 (file)
@@ -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;
 }