Skip to content

Commit d5901f5

Browse files
committed
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.
1 parent 6bbfaed commit d5901f5

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/main.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,6 +1011,14 @@ static void on_webctx_init_web_extension(WebKitWebContext *webctx, gpointer data
10111011
const char *name;
10121012
GVariant *vdata;
10131013

1014+
#ifdef DEBUG
1015+
char *extension = g_build_filename(EXTENSIONDIR, "webext_main.so", NULL);
1016+
if (!g_file_test(extension, G_FILE_TEST_IS_REGULAR)) {
1017+
g_warning("Cannot access web extension %s", extension);
1018+
}
1019+
g_free(extension);
1020+
#endif
1021+
10141022
/* Setup the extension directory. */
10151023
webkit_web_context_set_web_extensions_directory(webctx, EXTENSIONDIR);
10161024

0 commit comments

Comments
 (0)