0
Fork 0
mirror of https://codeberg.org/librewolf/source.git synced 2024-12-22 05:33:03 -05:00
LibreWolf/patches/flatpak-autoconf.patch
ohfp 0df1510afc Add flatpak autoconf patch to patches.txt
For switching flatpak builds over to using source + bsys builds,
the patch fixing the (odd?) default handling of the browser being in a
flatpak environment/sandbox (causing it to not load any of the LibreWolf
settings at all) would need to be added to the patches.txt, too.

It should not break anything else, as it is relatively specific to only
modify in-flatpak-behavior, as far as I understand it.
2023-03-30 11:46:49 +02:00

23 lines
1,008 B
Diff

diff --git a/extensions/pref/autoconfig/src/nsReadConfig.cpp b/extensions/pref/autoconfig/src/nsReadConfig.cpp
index 06f54dd0ab77..54f08ac90104 100644
--- a/extensions/pref/autoconfig/src/nsReadConfig.cpp
+++ b/extensions/pref/autoconfig/src/nsReadConfig.cpp
@@ -247,16 +247,8 @@ nsresult nsReadConfig::openAndEvaluateJSFile(const char* aFileName,
nsCOMPtr<nsIInputStream> inStr;
if (isBinDir) {
nsCOMPtr<nsIFile> jsFile;
-#if defined(MOZ_WIDGET_GTK)
- if (!mozilla::widget::IsRunningUnderFlatpakOrSnap()) {
-#endif // defined(MOZ_WIDGET_GTK)
- rv = NS_GetSpecialDirectory(NS_GRE_DIR, getter_AddRefs(jsFile));
-#if defined(MOZ_WIDGET_GTK)
- } else {
- rv = NS_GetSpecialDirectory(NS_OS_SYSTEM_CONFIG_DIR,
- getter_AddRefs(jsFile));
- }
-#endif // defined(MOZ_WIDGET_GTK)
+ rv = NS_GetSpecialDirectory(NS_GRE_DIR, getter_AddRefs(jsFile));
+
if (NS_FAILED(rv)) return rv;
rv = jsFile->AppendNative(nsDependentCString(aFileName));