[epiphany/revert-webapp-id-patch] Revert "Fix web app GApplication ID calculation"




commit 27a0821fd29fe70b615edfc76c88a98b3ce44bc2
Author: Phaedrus Leeds <mwleeds protonmail com>
Date:   Wed Jan 19 16:17:26 2022 -0800

    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.

 lib/ephy-web-app-utils.c | 7 +++----
 1 file 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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]