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 460318 0b8f6cf95d39dd430297fce89d9ab996361b91a4
parent 460317 11c7370ae92e99b06b6b1869edbd25418773acb8
child 460319 653ca8a2d6aec1477017df8120178c59d2755811
push id8904
push userryanvm@gmail.com
push dateThu, 22 Mar 2018 23:59:13 +0000
treeherdermozilla-beta@0b8f6cf95d39 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmkaply, ritu
bugs1444313
milestone60.0
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;
   }