diff --git a/src/desktop/recoll_index_on_ac.sh b/src/desktop/recoll_index_on_ac.sh
index 5df71287..751fefce 100755
--- a/src/desktop/recoll_index_on_ac.sh
+++ b/src/desktop/recoll_index_on_ac.sh
@@ -3,7 +3,14 @@
# This is a shell script that starts and stops the recollindex daemon
# depending on whether or not the power supply is plugged in. It should be
# called from the file ~/.config/autostart/recollindex.desktop.
-
+#
+# That is: make the script executable (chmod +x) and replace in
+# recollindex.desk the line:
+# Exec=recollindex -w 60 -m
+# With
+# Exec=/path/to/recoll_index_on_ac.sh
+#
+#
# By: The Doctor (drwho at virtadpt dot net)
# License: GPLv3
#
diff --git a/src/doc/user/usermanual.sgml b/src/doc/user/usermanual.sgml
index 8d03c6e0..258f8111 100644
--- a/src/doc/user/usermanual.sgml
+++ b/src/doc/user/usermanual.sgml
@@ -2489,15 +2489,40 @@ text/html [file:///Users/uncrypted-dockes/projets/bateaux/ilur/factEtCie/r
dir for filtering the
results on file location (Ex:
dir:/home/me/somedir). -dir
- also works to find results out of the specified directory, only
- after release 1.15.8. A tilde inside the value will be expanded to
- the home directory. dir is not a regular field
- and only one value makes sense in a query (you can't use
- dir:dir1 OR dir:dir2). Relative paths make
- sense, for example,
+ also works to find results not in the specified directory
+ (release >= 1.15.8). A tilde inside the value will be expanded
+ to the home directory. Wildcards will not
+ be expanded. You cannot use OR with
+ dir clauses (this restriction may go away in
+ the future).
+
+ Relative paths also make sense, for example,
dir:share/doc would match either
/usr/share/doc or
/usr/local/share/doc
+
+ Several dir clauses can be specified,
+ both positive and negative. For example the following makes sense:
+
+dir:recoll dir:src -dir:utils -dir:common
+ This would select results which have both
+ recoll and src in the
+ path (in any order), and which have not either
+ utils or
+ common.
+
+ Another special aspect of dir clauses is
+ that the values in the index are not transcoded to UTF-8, and
+ never lower-cased or unaccented, but stored as binary. This means
+ that you need to enter the values in the exact lower or upper
+ case, and that searches for names with diacritics may sometimes
+ be impossible because of character set conversion
+ issues. Non-ASCII UNIX file paths are an unending source of
+ trouble and are best avoided.
+
+ You need to use double-quotes around the path value if it
+ contains space characters.
+
size for filtering the
diff --git a/src/internfile/internfile.cpp b/src/internfile/internfile.cpp
index 95dd3d5f..d1ae14d4 100644
--- a/src/internfile/internfile.cpp
+++ b/src/internfile/internfile.cpp
@@ -187,18 +187,27 @@ void FileInterner::tmpcleanup()
// Empty handler on return says that we're in error, this will be
// processed by the first call to internfile().
// Split into "constructor calls init()" to allow use from other constructor
-FileInterner::FileInterner(const string &f, const struct stat *stp,
+FileInterner::FileInterner(const string &fn, const struct stat *stp,
RclConfig *cnf,
TempDir& td, int flags, const string *imime)
: m_tdir(td), m_ok(false), m_missingdatap(0)
{
+ LOGDEB0(("FileInterner::FileInterner(fn=%s)\n", fn.c_str()));
+ if (fn.empty()) {
+ LOGERR(("FileInterner::FileInterner: empty file name!\n"));
+ return;
+ }
initcommon(cnf, flags);
- init(f, stp, cnf, flags, imime);
+ init(fn, stp, cnf, flags, imime);
}
void FileInterner::init(const string &f, const struct stat *stp, RclConfig *cnf,
int flags, const string *imime)
{
+ if (f.empty()) {
+ LOGERR(("FileInterner::init: empty file name!\n"));
+ return;
+ }
m_fn = f;
// Compute udi for the input file. This is used by filters which
@@ -226,7 +235,7 @@ void FileInterner::init(const string &f, const struct stat *stp, RclConfig *cnf,
}
l_mime = *imime;
} else {
- LOGDEB(("FileInterner:: [%s] mime [%s] preview %d\n",
+ LOGDEB(("FileInterner::init fn [%s] mime [%s] preview %d\n",
f.c_str(), imime?imime->c_str() : "(null)", m_forPreview));
// Run mime type identification in any case (see comment above).
@@ -320,6 +329,7 @@ FileInterner::FileInterner(const string &data, RclConfig *cnf,
TempDir& td, int flags, const string& imime)
: m_tdir(td), m_ok(false), m_missingdatap(0)
{
+ LOGDEB0(("FileInterner::FileInterner(data)\n"));
initcommon(cnf, flags);
init(data, cnf, flags, imime);
}
@@ -384,7 +394,7 @@ FileInterner::FileInterner(const Rcl::Doc& idoc, RclConfig *cnf,
TempDir& td, int flags)
: m_tdir(td), m_ok(false), m_missingdatap(0)
{
- LOGDEB(("FileInterner::FileInterner(idoc)\n"));
+ LOGDEB0(("FileInterner::FileInterner(idoc)\n"));
initcommon(cnf, flags);
DocFetcher *fetcher = docFetcherMake(idoc);
diff --git a/src/rcldb/searchdata.cpp b/src/rcldb/searchdata.cpp
index 62b2a2c0..9d4ac3ec 100644
--- a/src/rcldb/searchdata.cpp
+++ b/src/rcldb/searchdata.cpp
@@ -368,7 +368,7 @@ bool SearchData::toNativeQuery(Rcl::Db &db, void *d, int maxexp, int maxcl)
xq = xq.empty() ? tq : Xapian::Query(Xapian::Query::OP_AND_NOT, xq, tq);
}
- // Add the directory filtering clause. This is a phrase of terms
+ // Add the directory filtering clauses. Each is a phrase of terms
// prefixed with the pathelt prefix XP
for (vector::const_iterator dit = m_dirspecs.begin();
dit != m_dirspecs.end(); dit++) {