diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/core.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/core/core.c b/src/core/core.c index 8d4daa7..26469ff 100644 --- a/src/core/core.c +++ b/src/core/core.c @@ -41,6 +41,9 @@ #include "processors.h" #include "queue.h" #include "../analysis/scan/core.h" +#ifdef HAVE_MAGIC_SUPPORT +# include "../analysis/scan/items/magic/cookie.h" +#endif #include "../common/io.h" #include "../common/xdg.h" #include "../glibext/linesegment.h" @@ -102,6 +105,10 @@ bool load_all_core_components(bool cs) explorer = g_content_explorer_new(); set_current_content_explorer(explorer); +#ifdef HAVE_MAGIC_SUPPORT + if (result) result = init_magic_cookie(); +#endif + resolver = g_content_resolver_new(); set_current_content_resolver(resolver); @@ -152,6 +159,10 @@ void unload_all_core_components(bool cs) set_rost_root_namespace(NULL); +#ifdef HAVE_MAGIC_SUPPORT + exit_magic_cookie(); +#endif + set_current_content_resolver(NULL); set_current_content_explorer(NULL); |