diff options
author | Michael Catanzaro <mcatanzaro@igalia.com> | 2019-01-07 21:09:44 -0600 |
---|---|---|
committer | Jan-Michael Brummer <jan.brummer@tabos.org> | 2019-01-08 19:42:49 +0000 |
commit | b1b83d701d29e26f1519c6d9c88ef494a53af30e (patch) | |
tree | 43a9c85346a3fbd7897ac212aa96ff42aba3a4f7 /src/window-commands.c | |
parent | 98dff211793e31fdb2b8842841f438adeedab641 (diff) | |
download | epiphany-b1b83d701d29e26f1519c6d9c88ef494a53af30e.tar.gz |
Make it harder to call functions that don't work under flatpak
Since calling these functions now results in a crash, let's make it
harder to use them by adding EphyFileHelpersNotFlatpakTag, which just
forces the caller to pass an ugly enum value
EPHY_FILE_HELPERS_I_UNDERSTAND_I_MUST_NOT_USE_THIS_FUNCTION_UNDER_FLATPAK
in order to use any of the functions. Ugliness is a feature here, not a
bug, to draw scrutiny to any code that might be using these functions.
Diffstat (limited to 'src/window-commands.c')
-rw-r--r-- | src/window-commands.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/window-commands.c b/src/window-commands.c index dd832346b..e93d03ac8 100644 --- a/src/window-commands.c +++ b/src/window-commands.c @@ -1223,7 +1223,11 @@ notify_launch_cb (NotifyNotification *notification, { char *desktop_file = user_data; - ephy_file_launch_desktop_file (desktop_file, NULL, 0, NULL); + /* We can't get here under flatpak because all web app functionality + * is disabled when running under flatpak. + */ + ephy_file_launch_desktop_file (desktop_file, NULL, 0, NULL, + EPHY_FILE_HELPERS_I_UNDERSTAND_I_MUST_NOT_USE_THIS_FUNCTION_UNDER_FLATPAK); g_free (desktop_file); } |