Bug 1444313 - Fix desktop file name for snapd's xdg-setting wrapper. r=mkaply
authorOlivier Tilloy <olivier@tilloy.net>
Fri, 09 Mar 2018 09:04:25 +0100
changeset 409517 e39a944f310fdc7dfc35b45792ee99f0265c47de
parent 409516 770603f0efe14b2c7fbf60875535f240b09e2915
child 409518 bcd284a1f312f79c4d3866975a6fcaaf17006664
push id61538
push usermozilla@kaply.com
push dateThu, 22 Mar 2018 15:41:20 +0000
treeherderautoland@e39a944f310f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmkaply
bugs1444313
milestone61.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1444313 - Fix desktop file name for snapd's xdg-setting wrapper. r=mkaply 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;
   }