From d5901f54976733d9413b98974a533b08d33edf9e Mon Sep 17 00:00:00 2001 From: Daniel Carl Date: Sat, 2 Dec 2017 23:42:02 +0100 Subject: [PATCH] Add warning when web extension could not be found. The warning is only shown if compiled with DEBUG. Hope this will helps users and package managers to check the compilation or installation. --- src/main.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main.c b/src/main.c index f71442d..03575a3 100644 --- a/src/main.c +++ b/src/main.c @@ -1011,6 +1011,14 @@ static void on_webctx_init_web_extension(WebKitWebContext *webctx, gpointer data const char *name; GVariant *vdata; +#ifdef DEBUG + char *extension = g_build_filename(EXTENSIONDIR, "webext_main.so", NULL); + if (!g_file_test(extension, G_FILE_TEST_IS_REGULAR)) { + g_warning("Cannot access web extension %s", extension); + } + g_free(extension); +#endif + /* Setup the extension directory. */ webkit_web_context_set_web_extensions_directory(webctx, EXTENSIONDIR); -- 2.20.1