[tor-commits] [meek/master] Slightly refactor the logic around TOR_BROWSER_MEEK_PROFILE.
dcf at torproject.org
dcf at torproject.org
Tue Jul 17 04:55:42 UTC 2018
commit 0e65717438a60d088aa395a9de5f063d0814e0bf
Author: David Fifield <david at bamsoftware.com>
Date: Mon Jul 16 21:52:23 2018 -0700
Slightly refactor the logic around TOR_BROWSER_MEEK_PROFILE.
---
meek-client-torbrowser/meek-client-torbrowser.go | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/meek-client-torbrowser/meek-client-torbrowser.go b/meek-client-torbrowser/meek-client-torbrowser.go
index abf119b..7520a0b 100644
--- a/meek-client-torbrowser/meek-client-torbrowser.go
+++ b/meek-client-torbrowser/meek-client-torbrowser.go
@@ -206,15 +206,15 @@ func runFirefox() (cmd *exec.Cmd, stdout io.Reader, err error) {
return
}
var profilePath = os.Getenv("TOR_BROWSER_MEEK_PROFILE")
- if profilePath == "" {
- var torDataDir = os.Getenv("TOR_BROWSER_TOR_DATA_DIR")
- if torDataDir != "" && torDataDirFirefoxProfilePath != "" {
- profilePath = filepath.Join(torDataDir, torDataDirFirefoxProfilePath)
- } else {
- profilePath, err = filepath.Abs(firefoxProfilePath)
- if err != nil {
- return
- }
+ var torDataDir = os.Getenv("TOR_BROWSER_TOR_DATA_DIR")
+ if profilePath != "" {
+ // Take directly from TOR_BROWSER_MEEK_PROFILE.
+ } else if torDataDir != "" && torDataDirFirefoxProfilePath != "" {
+ profilePath = filepath.Join(torDataDir, torDataDirFirefoxProfilePath)
+ } else {
+ profilePath, err = filepath.Abs(firefoxProfilePath)
+ if err != nil {
+ return
}
}
err = prepareBrowserProfile(profilePath)
More information about the tor-commits
mailing list