]> git.pld-linux.org Git - packages/file.git/blame - searchpath.patch
add mime type for *.m3u files; rel 4
[packages/file.git] / searchpath.patch
CommitLineData
7abc2151
ER
1still search in /etc/magic
2still use ~/.magic by default
3
8778f9e2
JB
4--- file-5.39/src/Makefile.am.orig 2020-11-03 18:58:10.356256020 +0100
5+++ file-5.39/src/Makefile.am 2020-11-03 18:58:16.536576455 +0100
7abc2151
ER
6@@ -4,7 +4,7 @@
7
8 bin_PROGRAMS = file
9
10-AM_CPPFLAGS = -DMAGIC='"$(MAGIC)"'
11+AM_CPPFLAGS = -DMAGIC='"/etc/magic:$(MAGIC)"'
49d7bd2c 12 AM_CFLAGS = $(CFLAG_VISIBILITY) @WARNINGS@
7abc2151 13
8778f9e2 14 libmagic_la_SOURCES = buffer.c magic.c apprentice.c softmagic.c ascmagic.c \
0fa7f91e
ER
15--- file-5.06/src/magic.c~ 2011-04-07 22:20:30.000000000 +0300
16+++ file-5.06/src/magic.c 2011-04-18 11:56:38.611292743 +0300
17@@ -107,7 +107,7 @@
4291c010 18 file_private const char *
7abc2151
ER
19 get_default_magic(void)
20 {
21- static const char hmagic[] = "/.magic/magic.mgc";
22+ static const char hmagic[] = "/.magic";
0fa7f91e
ER
23 static char *default_magic;
24 char *home, *hmagicpath;
25
3ba061fc
JR
26--- a/src/apprentice.c
27+++ b/src/apprentice.c
28@@ -460,7 +460,7 @@ apprentice_1(struct magic_set *ms, const char *fn, int action)
29 #ifndef COMPILE_ONLY
30 map = apprentice_map(ms, fn);
31 if (map == NULL) {
32- if (ms->flags & MAGIC_CHECK)
33+ if (ms->flags & MAGIC_CHECK && strcmp("/etc/magic", fn) != 0)
4291c010 34 file_magwarn(NULL, "using regular magic file `%s'", fn);
3ba061fc
JR
35 map = apprentice_load(ms, fn, action);
36 if (map == NULL)
This page took 0.284839 seconds and 4 git commands to generate.