Skip to content

Commit

Permalink
Add warning when web extension could not be found.
Browse files Browse the repository at this point in the history
The warning is only shown if compiled with DEBUG. Hope this will helps
users and package managers to check the compilation or installation.
  • Loading branch information
fanglingsu committed Dec 2, 2017
1 parent 6bbfaed commit d5901f5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit d5901f5

Please sign in to comment.