--- a/src/qtgui/guiutils.cpp
+++ b/src/qtgui/guiutils.cpp
@@ -303,8 +303,23 @@
}
}
- //Get the "active external indexes":
+ // Get the remembered "active external indexes":
prefs.activeExtraDbs = g_dynconf->getStringList(actEdbsSk);
+
+ // Clean up the list: remove directories which are not
+ // actually there: useful for removable volumes.
+ for (list<string>::iterator it = prefs.activeExtraDbs.begin();
+ it != prefs.activeExtraDbs.end();) {
+ if (!Rcl::Db::testDbDir(*it)) {
+ LOGINFO(("Not a xapian index: [%s]\n", it->c_str()));
+ it = prefs.activeExtraDbs.erase(it);
+ } else {
+ it++;
+ }
+ }
+
+ // Get active db directives from the environment. This can only add to
+ // the remembered and cleaned up list
const char *cp4Act;
if ((cp4Act = getenv("RECOLL_ACTIVE_EXTRA_DBS")) != 0) {
vector<string> dbl;
@@ -325,6 +340,7 @@
} //for
} //if
}
+
#if 0
{
list<string>::const_iterator it;