From 8512987de9d16e899e1c380d73766495e98c6a2e Mon Sep 17 00:00:00 2001 From: Chakib Ben Ziane Date: Thu, 28 Feb 2019 17:55:34 +0100 Subject: [PATCH] fix firefox profile loading --- chrome.go | 1 + firefox.go | 10 ++-------- mozilla/firefox_config.go | 1 + 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/chrome.go b/chrome.go index 751d855..db3427b 100644 --- a/chrome.go +++ b/chrome.go @@ -15,6 +15,7 @@ import ( "github.com/fsnotify/fsnotify" ) +//TODO: replace with new profile manager var ChromeData = BrowserPaths{ BookmarkFile: "Bookmarks", BookmarkDir: "/home/spike/.config/google-chrome-unstable/Default/", diff --git a/firefox.go b/firefox.go index 7ad4e13..6548462 100644 --- a/firefox.go +++ b/firefox.go @@ -53,12 +53,6 @@ const ( ) var ( - Firefox = BrowserPaths{ - - BookmarkFile: mozilla.BookmarkFile, - BookmarkDir: mozilla.GetBookmarkDir(), - } - ErrInitFirefox = errors.New("Could not start Firefox watcher") ) @@ -132,8 +126,8 @@ func NewFFBrowser() IBrowser { browser := new(FFBrowser) browser.name = "firefox" browser.bType = TFirefox - browser.baseDir = Firefox.BookmarkDir - browser.bkFile = Firefox.BookmarkFile + browser.bkFile = mozilla.BookmarkFile + browser.baseDir = mozilla.GetBookmarkDir() browser.useFileWatcher = true browser.Stats = &parsing.Stats{} browser.NodeTree = &tree.Node{Name: "root", Parent: nil, Type: "root"} diff --git a/mozilla/firefox_config.go b/mozilla/firefox_config.go index 22ed0e7..45800e6 100644 --- a/mozilla/firefox_config.go +++ b/mozilla/firefox_config.go @@ -65,6 +65,7 @@ func (fc *FirefoxConfig) MapFrom(src interface{}) error { } func SetBookmarkDir(dir string) { + log.Debugf("setting bookmark dir to %s", dir) bookmarkDir = dir }