From a40a212774151340931928e4a571233b4f9d5a70 Mon Sep 17 00:00:00 2001 From: idk Date: Wed, 18 May 2022 15:14:15 -0400 Subject: [PATCH] Always get profile from data directory --- src/win/common.bat | 1 + src/win/copy-config-profile.bat | 8 ++++---- src/win/copy-profile.bat | 8 ++++---- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/win/common.bat b/src/win/common.bat index 3ef2cda..71a663d 100644 --- a/src/win/common.bat +++ b/src/win/common.bat @@ -2,6 +2,7 @@ SET MYPATH=%~dp0 set ProgramFiles64="%ProgramFiles: (x86)=%" +set "I2PData=%LocalAppData%\I2P\" set "I2PPath=%ProgramFiles%\I2P\" if exist "%LocalAppData%\I2P\I2P.exe" ( diff --git a/src/win/copy-config-profile.bat b/src/win/copy-config-profile.bat index 3b2b215..21cf54b 100644 --- a/src/win/copy-config-profile.bat +++ b/src/win/copy-config-profile.bat @@ -4,11 +4,11 @@ call "%MYPATH%common.bat" if (exist "%LOCALAPPDATA%\I2PBrowser-Launcher\firefox.profile.config.i2p\") ( echo "profile is configured" - xcopy /s /i /y "%I2PPath%\I2PBrowser-Launcher\firefox.profile.config.i2p\extensions" "%LOCALAPPDATA%\I2PBrowser-Launcher\firefox.profile.config.i2p\extensions" + xcopy /s /i /y "%I2PData%\I2PBrowser-Launcher\firefox.profile.config.i2p\extensions" "%LOCALAPPDATA%\I2PBrowser-Launcher\firefox.profile.config.i2p\extensions" ) else ( echo "configuring profile" - xcopy /s /i /y "%I2PPath%\I2PBrowser-Launcher\firefox.profile.config.i2p" "%LOCALAPPDATA%\I2PBrowser-Launcher\firefox.profile.config.i2p" + xcopy /s /i /y "%I2PData%\I2PBrowser-Launcher\firefox.profile.config.i2p" "%LOCALAPPDATA%\I2PBrowser-Launcher\firefox.profile.config.i2p" ) -xcopy /s /i /y "%I2PPath%\I2PBrowser-Launcher\firefox.profile.config.i2p\user.js" "%LOCALAPPDATA%\I2PBrowser-Launcher\firefox.profile.config.i2p\user.js" -xcopy /s /i /y "%I2PPath%\I2PBrowser-Launcher\firefox.profile.config.i2p\prefs.js" "%LOCALAPPDATA%\I2PBrowser-Launcher\firefox.profile.config.i2p\prefs.js" +xcopy /s /i /y "%I2PData%\I2PBrowser-Launcher\firefox.profile.config.i2p\user.js" "%LOCALAPPDATA%\I2PBrowser-Launcher\firefox.profile.config.i2p\user.js" +xcopy /s /i /y "%I2PData%\I2PBrowser-Launcher\firefox.profile.config.i2p\prefs.js" "%LOCALAPPDATA%\I2PBrowser-Launcher\firefox.profile.config.i2p\prefs.js" diff --git a/src/win/copy-profile.bat b/src/win/copy-profile.bat index a3cde0f..13b3ed5 100644 --- a/src/win/copy-profile.bat +++ b/src/win/copy-profile.bat @@ -4,11 +4,11 @@ call "%MYPATH%common.bat" if (exist "%LOCALAPPDATA%\I2PBrowser-Launcher\firefox.profile.i2p\") ( echo "profile is configured, updating extensions" - xcopy /s /i /y "%I2PPath%\I2PBrowser-Launcher\firefox.profile.i2p\extensions" "%LOCALAPPDATA%\I2PBrowser-Launcher\firefox.profile.i2p\extensions" + xcopy /s /i /y "%I2PData%\I2PBrowser-Launcher\firefox.profile.i2p\extensions" "%LOCALAPPDATA%\I2PBrowser-Launcher\firefox.profile.i2p\extensions" ) else ( echo "configuring profile" - xcopy /s /i /y "%I2PPath%\I2PBrowser-Launcher\firefox.profile.i2p" "%LOCALAPPDATA%\I2PBrowser-Launcher\firefox.profile.i2p" + xcopy /s /i /y "%I2PData%\I2PBrowser-Launcher\firefox.profile.i2p" "%LOCALAPPDATA%\I2PBrowser-Launcher\firefox.profile.i2p" ) -xcopy /s /i /y "%I2PPath%\I2PBrowser-Launcher\firefox.profile.i2p\user.js" "%LOCALAPPDATA%\I2PBrowser-Launcher\firefox.profile.i2p\user.js" -xcopy /s /i /y "%I2PPath%\I2PBrowser-Launcher\firefox.profile.i2p\prefs.js" "%LOCALAPPDATA%\I2PBrowser-Launcher\firefox.profile.i2p\prefs.js" +xcopy /s /i /y "%I2PData%\I2PBrowser-Launcher\firefox.profile.i2p\user.js" "%LOCALAPPDATA%\I2PBrowser-Launcher\firefox.profile.i2p\user.js" +xcopy /s /i /y "%I2PData%\I2PBrowser-Launcher\firefox.profile.i2p\prefs.js" "%LOCALAPPDATA%\I2PBrowser-Launcher\firefox.profile.i2p\prefs.js"