]> granicus.if.org Git - file/commitdiff
PR/289: Leave the database loaded in case of list, check, compile.
authorChristos Zoulas <christos@zoulas.com>
Tue, 19 Nov 2013 21:01:12 +0000 (21:01 +0000)
committerChristos Zoulas <christos@zoulas.com>
Tue, 19 Nov 2013 21:01:12 +0000 (21:01 +0000)
src/apprentice.c

index 59029fa8f29aa8cf449c81cecc864bc3634859a9..ffea5e60c25f7e577e3671a83e7f3c7820e1a101 100644 (file)
@@ -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: