diff --git a/runners/bookmarks/browsers/firefox.cpp b/runners/bookmarks/browsers/firefox.cpp --- a/runners/bookmarks/browsers/firefox.cpp +++ b/runners/bookmarks/browsers/firefox.cpp @@ -138,7 +138,7 @@ KConfigGroup grp = config; /* This allows the user to specify a profile database */ m_dbFile = grp.readEntry("dbfile", QLatin1String("")); - if (m_dbFile.isEmpty() || QFile::exists(m_dbFile)) { + if (m_dbFile.isEmpty() || !QFile::exists(m_dbFile)) { //Try to get the right database file, the default profile is used KConfig firefoxProfile(QDir::homePath() + "/.mozilla/firefox/profiles.ini", KConfig::SimpleConfig); @@ -171,6 +171,12 @@ m_dbFile = profilePath + "/places.sqlite"; grp.writeEntry("dbfile", m_dbFile); m_dbFile_fav = profilePath + "/favicons.sqlite"; + } else { + auto dir = QDir(m_dbFile); + if (dir.cdUp()) { + QString profilePath = dir.absolutePath(); + m_dbFile_fav = profilePath + "/favicons.sqlite"; + } } } else { //qDebug() << "SQLITE driver isn't available";