Loading toolkit/xre/nsXREDirProvider.cpp +23 −12 Original line number Diff line number Diff line Loading @@ -1238,20 +1238,31 @@ nsresult nsXREDirProvider::GetPortableDataDir(nsIFile** aFile, } # endif # if defined(MOZ_WIDGET_GTK) // On Linux, Firefox supports the is-packaged-app for the .deb distribution. // We cannot use mozilla::widget::IsPackagedAppFileExists because it relies on // this service to be initialized, but this function is called during the // initialization. Therefore, we need to re-implement this check. nsLiteralCString systemInstallNames[] = {"system-install"_ns, "is-packaged-app"_ns}; # else nsLiteralCString systemInstallNames[] = {"system-install"_ns}; # endif for (const nsLiteralCString& fileName : systemInstallNames) { nsCOMPtr<nsIFile> systemInstallFile; rv = exeDir->Clone(getter_AddRefs(systemInstallFile)); NS_ENSURE_SUCCESS(rv, rv); rv = systemInstallFile->AppendNative("system-install"_ns); rv = systemInstallFile->AppendNative(fileName); NS_ENSURE_SUCCESS(rv, rv); bool exists = false; rv = systemInstallFile->Exists(&exists); NS_ENSURE_SUCCESS(rv, rv); if (exists) { aIsPortable = false; gDataDirPortable.emplace(nullptr); return NS_OK; } } nsCOMPtr<nsIFile> localDir = exeDir; # if defined(XP_MACOSX) Loading xpcom/io/nsAppFileLocationProvider.cpp +21 −11 Original line number Diff line number Diff line Loading @@ -195,10 +195,18 @@ static nsresult SetupPortableMode(nsIFile** aDirectory, bool aLocal, } # endif # if defined(MOZ_WIDGET_GTK) // On Linux, Firefox supports the is-packaged-app for the .deb distribution. nsLiteralCString systemInstallNames[] = {"system-install"_ns, "is-packaged-app"_ns}; # else nsLiteralCString systemInstallNames[] = {"system-install"_ns}; # endif for (const nsLiteralCString& fileName : systemInstallNames) { nsCOMPtr<nsIFile> systemInstallFile; rv = exeDir->Clone(getter_AddRefs(systemInstallFile)); NS_ENSURE_SUCCESS(rv, rv); rv = systemInstallFile->AppendNative("system-install"_ns); rv = systemInstallFile->AppendNative(fileName); NS_ENSURE_SUCCESS(rv, rv); bool exists = false; Loading @@ -208,6 +216,7 @@ static nsresult SetupPortableMode(nsIFile** aDirectory, bool aLocal, aIsPortable = false; return NS_OK; } } nsCOMPtr<nsIFile> localDir = exeDir; # if defined(XP_MACOSX) Loading @@ -226,6 +235,7 @@ static nsresult SetupPortableMode(nsIFile** aDirectory, bool aLocal, NS_ENSURE_SUCCESS(rv, rv); } bool exists = false; rv = localDir->Exists(&exists); NS_ENSURE_SUCCESS(rv, rv); if (!exists) { Loading Loading
toolkit/xre/nsXREDirProvider.cpp +23 −12 Original line number Diff line number Diff line Loading @@ -1238,20 +1238,31 @@ nsresult nsXREDirProvider::GetPortableDataDir(nsIFile** aFile, } # endif # if defined(MOZ_WIDGET_GTK) // On Linux, Firefox supports the is-packaged-app for the .deb distribution. // We cannot use mozilla::widget::IsPackagedAppFileExists because it relies on // this service to be initialized, but this function is called during the // initialization. Therefore, we need to re-implement this check. nsLiteralCString systemInstallNames[] = {"system-install"_ns, "is-packaged-app"_ns}; # else nsLiteralCString systemInstallNames[] = {"system-install"_ns}; # endif for (const nsLiteralCString& fileName : systemInstallNames) { nsCOMPtr<nsIFile> systemInstallFile; rv = exeDir->Clone(getter_AddRefs(systemInstallFile)); NS_ENSURE_SUCCESS(rv, rv); rv = systemInstallFile->AppendNative("system-install"_ns); rv = systemInstallFile->AppendNative(fileName); NS_ENSURE_SUCCESS(rv, rv); bool exists = false; rv = systemInstallFile->Exists(&exists); NS_ENSURE_SUCCESS(rv, rv); if (exists) { aIsPortable = false; gDataDirPortable.emplace(nullptr); return NS_OK; } } nsCOMPtr<nsIFile> localDir = exeDir; # if defined(XP_MACOSX) Loading
xpcom/io/nsAppFileLocationProvider.cpp +21 −11 Original line number Diff line number Diff line Loading @@ -195,10 +195,18 @@ static nsresult SetupPortableMode(nsIFile** aDirectory, bool aLocal, } # endif # if defined(MOZ_WIDGET_GTK) // On Linux, Firefox supports the is-packaged-app for the .deb distribution. nsLiteralCString systemInstallNames[] = {"system-install"_ns, "is-packaged-app"_ns}; # else nsLiteralCString systemInstallNames[] = {"system-install"_ns}; # endif for (const nsLiteralCString& fileName : systemInstallNames) { nsCOMPtr<nsIFile> systemInstallFile; rv = exeDir->Clone(getter_AddRefs(systemInstallFile)); NS_ENSURE_SUCCESS(rv, rv); rv = systemInstallFile->AppendNative("system-install"_ns); rv = systemInstallFile->AppendNative(fileName); NS_ENSURE_SUCCESS(rv, rv); bool exists = false; Loading @@ -208,6 +216,7 @@ static nsresult SetupPortableMode(nsIFile** aDirectory, bool aLocal, aIsPortable = false; return NS_OK; } } nsCOMPtr<nsIFile> localDir = exeDir; # if defined(XP_MACOSX) Loading @@ -226,6 +235,7 @@ static nsresult SetupPortableMode(nsIFile** aDirectory, bool aLocal, NS_ENSURE_SUCCESS(rv, rv); } bool exists = false; rv = localDir->Exists(&exists); NS_ENSURE_SUCCESS(rv, rv); if (!exists) { Loading