GNOME Bugzilla – Bug 790781
Web apps of certain naming fails to launch
Last modified: 2017-12-29 03:02:34 UTC
I was making web app launchers for messaging apps that I use, then I ran into an issue when I created a launcher called 'WhatsApp'. After some trial and error I found that no matter what website the web app launcher points to, as long as I name it 'WhatsApp', it will fail to launch with this error: ** (b336fc558722224b7ffe98607055d55f0fe52450:18872): WARNING **: Required desktop file not present at /home/katharine/.config/epiphany/app-epiphany-whatsapp-b336fc558722224b7ffe98607055d55f0fe52450/b336fc558722224b7ffe98607055d55f0fe52450.desktop However other two launchers with naming 'Facebook Messenger' and 'Telegram' has no issue launching.
Created attachment 366035 [details] [review] application mode: use g_strstr_len to get base name of the desktop file Currently, g_strrstr() is used to get base name of the desktop file. But g_strrstr() searches the last occurrence of "app-" instead of the first occurrence. So if the name of the web application contains "app", users won't be able to open it. This is the patch fixing that using g_strstr_len() instead of g_strrstr().
Review of attachment 366035 [details] [review]: Wow! Thanks for fixing so many issues, Jonathan. ::: lib/ephy-web-app-utils.c @@ +351,3 @@ g_assert (profile_directory != NULL); + app_name = g_strstr_len (profile_directory, -1, EPHY_WEB_APP_PREFIX); It would be better to use plain strstr() here.
Comment on attachment 366035 [details] [review] application mode: use g_strstr_len to get base name of the desktop file > It would be better to use plain strstr() here. Sure. modified the patch and pushed to master as commit 521a0e6cc09d09f8aafe152ed90ac2e12869dec0.