summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPhaedrus Leeds <mwleeds@protonmail.com>2022-01-19 16:17:26 -0800
committerPhaedrus Leeds <mwleeds@protonmail.com>2022-01-19 16:17:26 -0800
commitf366ace4c42b7fc39b8f82e7e6085cd476cb06f4 (patch)
tree5d6e723cf942d86880f344974035a84930d1023a /lib
parent708b35be3483369256165520e182b6d3615f7081 (diff)
downloadepiphany-f366ace4c42b7fc39b8f82e7e6085cd476cb06f4.tar.gz
Revert "Fix web app GApplication ID calculation"
This reverts commit 708b35be3483369256165520e182b6d3615f7081. It turns out this part of the function is unreachable when the id is just a checksum, because in that case g_application_id_is_valid() will always be true so the function returns just a few lines above. Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1064>
Diffstat (limited to 'lib')
-rw-r--r--lib/ephy-web-app-utils.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/ephy-web-app-utils.c b/lib/ephy-web-app-utils.c
index d75d6d03d..dd2291833 100644
--- a/lib/ephy-web-app-utils.c
+++ b/lib/ephy-web-app-utils.c
@@ -125,11 +125,10 @@ get_gapplication_id_from_id (const char *id)
/* Split ID into: <normalized-name>-<checksum> */
final_hyphen = strrchr (id, '-');
if (!final_hyphen) {
- /* The id was derived from the profile dir and it's only the checksum part */
- checksum = id;
- } else {
- checksum = final_hyphen + 1;
+ g_warning ("Web app ID %s is broken: must contain a hyphen", id);
+ return NULL;
}
+ checksum = final_hyphen + 1;
if (*checksum == '\0') {
g_warning ("Web app ID %s is broken: should end with checksum, not hyphen", id);