From: Christos Zoulas Date: Tue, 19 Nov 2013 21:01:12 +0000 (+0000) Subject: PR/289: Leave the database loaded in case of list, check, compile. X-Git-Tag: FILE5_16~11 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=907d04d772d42aa32244d5ae46ff018f98f4bb3f;p=file PR/289: Leave the database loaded in case of list, check, compile. --- diff --git a/src/apprentice.c b/src/apprentice.c index 59029fa8..ffea5e60 100644 --- a/src/apprentice.c +++ b/src/apprentice.c @@ -32,7 +32,7 @@ #include "file.h" #ifndef lint -FILE_RCSID("@(#)$File: apprentice.c,v 1.194 2013/05/02 21:58:20 christos Exp $") +FILE_RCSID("@(#)$File: apprentice.c,v 1.195 2013/09/12 15:57:32 christos Exp $") #endif /* lint */ #include "magic.h" @@ -603,6 +603,10 @@ file_apprentice(struct magic_set *ms, const char *fn, int action) return -1; } +#if 0 + /* + * Always leave the database loaded + */ if (action == FILE_LOAD) return 0; @@ -610,8 +614,10 @@ file_apprentice(struct magic_set *ms, const char *fn, int action) mlist_free(ms->mlist[i]); ms->mlist[i] = NULL; } +#endif switch (action) { + case FILE_LOAD: case FILE_COMPILE: case FILE_CHECK: case FILE_LIST: