Bug 1444313 - Fix desktop file name for snapd's xdg-setting wrapper. r=mkaply, a=ritu
authorOlivier Tilloy <olivier@tilloy.net>
Fri, 09 Mar 2018 09:04:25 +0100
changeset 455151 a4854aa5357768752538e132463bf7a157256546
parent 455150 68261a2001c29517c07b50850d4aa1fbe345bcf8
child 455152 239e434d6d2b8e1e2b697c3416d1e96d48fe98e5
push id1678
push userryanvm@gmail.com
push dateFri, 23 Mar 2018 15:49:52 +0000
treeherdermozilla-release@239e434d6d2b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmkaply, ritu
bugs1444313
milestone59.0.2
Bug 1444313 - Fix desktop file name for snapd's xdg-setting wrapper. r=mkaply, a=ritu MozReview-Commit-ID: KfG8oEYArKm
browser/components/shell/nsGNOMEShellService.cpp
--- a/browser/components/shell/nsGNOMEShellService.cpp
+++ b/browser/components/shell/nsGNOMEShellService.cpp
@@ -210,17 +210,17 @@ NS_IMETHODIMP
 nsGNOMEShellService::IsDefaultBrowser(bool aStartupCheck,
                                       bool aForAllTypes,
                                       bool* aIsDefaultBrowser)
 {
   *aIsDefaultBrowser = false;
 
   if (IsRunningAsASnap()) {
     const gchar *argv[] = { "xdg-settings", "check", "default-web-browser",
-                            "firefox_firefox.desktop", nullptr };
+                            "firefox.desktop", nullptr };
     GSpawnFlags flags = static_cast<GSpawnFlags>(G_SPAWN_SEARCH_PATH |
                                                  G_SPAWN_STDERR_TO_DEV_NULL);
     gchar *output = nullptr;
     gint exit_status = 0;
     if (!g_spawn_sync(nullptr, (gchar **) argv, nullptr, flags, nullptr,
                       nullptr, &output, nullptr, &exit_status, nullptr)) {
       return NS_OK;
     }
@@ -282,17 +282,17 @@ nsGNOMEShellService::SetDefaultBrowser(b
 {
 #ifdef DEBUG
   if (aForAllUsers)
     NS_WARNING("Setting the default browser for all users is not yet supported");
 #endif
 
   if (IsRunningAsASnap()) {
     const gchar *argv[] = { "xdg-settings", "set", "default-web-browser",
-                            "firefox_firefox.desktop", nullptr };
+                            "firefox.desktop", nullptr };
     GSpawnFlags flags = static_cast<GSpawnFlags>(G_SPAWN_SEARCH_PATH |
                                                  G_SPAWN_STDOUT_TO_DEV_NULL |
                                                  G_SPAWN_STDERR_TO_DEV_NULL);
     g_spawn_sync(nullptr, (gchar **) argv, nullptr, flags, nullptr, nullptr,
                  nullptr, nullptr, nullptr, nullptr);
     return NS_OK;
   }