From acff4634e91e86dc4cb1554b5291d291286d32d4 Mon Sep 17 00:00:00 2001 From: Manpreet Singh Date: Thu, 22 Jan 2026 08:04:52 -0800 Subject: [PATCH] Support the XDG base directory based default profile path Starting with Firefox 147, Firefox supports XDG base directory specification --- updater.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/updater.sh b/updater.sh index 72c77fcb..89ae3ac1 100755 --- a/updater.sh +++ b/updater.sh @@ -159,6 +159,8 @@ readIniFile() { # expects one argument: absolute path of profiles.ini getProfilePath() { declare -r f1=~/Library/Application\ Support/Firefox/profiles.ini declare -r f2=~/.mozilla/firefox/profiles.ini + declare -r f3="${XDG_CONFIG_HOME:-"$HOME/.config"}/mozilla/firefox/profiles.ini" + declare -r f4=~/.config/mozilla/firefox/profiles.ini if [ "$PROFILE_PATH" = false ]; then PROFILE_PATH="$SCRIPT_DIR" @@ -167,6 +169,10 @@ getProfilePath() { readIniFile "$f1" # updates PROFILE_PATH or exits on error elif [[ -f "$f2" ]]; then readIniFile "$f2" + elif [[ -f "$f3" && $f3 == /* ]]; then + readIniFile "$f3" + elif [[ -f "$f4" ]]; then + readIniFile "$f4" else echo -e "${RED}Error: Sorry, -l is not supported for your OS${NC}" exit 1