From: Daniel Carl Date: Sat, 2 Dec 2017 22:42:02 +0000 (+0100) Subject: Add warning when web extension could not be found. X-Git-Url: https://git.owens.tech///git?a=commitdiff_plain;h=d5901f54976733d9413b98974a533b08d33edf9e;p=vimb.git 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. --- 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);