fix firefox profile loading

This commit is contained in:
Chakib Ben Ziane 2019-02-28 17:55:34 +01:00
parent 7dd439a295
commit 8512987de9
3 changed files with 4 additions and 8 deletions

View File

@ -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/",

View File

@ -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"}

View File

@ -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
}