diff --git a/src/internfile/internfile.cpp b/src/internfile/internfile.cpp index e9b8d153..5e79ed3d 100644 --- a/src/internfile/internfile.cpp +++ b/src/internfile/internfile.cpp @@ -53,10 +53,31 @@ using namespace std; #include "pxattr.h" #endif // RCL_USE_XATTR +static const string stxtplain("text/plain"); + // The internal path element separator. This can't be the same as the rcldb // file to ipath separator : "|" +// We replace it with a control char if it comes out of a filter (ie: +// rclzip or rclchm can do this). If you want the SOH control char +// inside an ipath, you're out of luck (and a bit weird). static const string isep(":"); -static const string stxtplain("text/plain"); +static const char colon_repl = '\x01'; +static string colon_hide(const string& in) +{ + string out; + for (string::const_iterator it = in.begin(); it != in.end(); it++) { + out += *it == ':' ? colon_repl : *it; + } + return out; +} +static string colon_restore(const string& in) +{ + string out; + for (string::const_iterator it = in.begin(); it != in.end(); it++) { + out += *it == colon_repl ? ':' : *it; + } + return out; +} set FileInterner::o_missingExternal; map > FileInterner::o_typesForMissing; @@ -603,7 +624,7 @@ void FileInterner::collectIpathAndMT(Rcl::Doc& doc, string& ipath) const getKeyValue(docdata, keymt, doc.mimetype); getKeyValue(docdata, keyfn, doc.utf8fn); } - ipath += ipathel + isep; + ipath += colon_hide(ipathel) + isep; } else { ipath += isep; } @@ -750,6 +771,10 @@ FileInterner::Status FileInterner::internfile(Rcl::Doc& doc, string& ipath) if (!ipath.empty()) { vector lipath; stringToTokens(ipath, lipath, isep, true); + for (vector::iterator it = lipath.begin(); + it != lipath.end(); it++) { + *it = colon_restore(*it); + } vipath.insert(vipath.begin(), lipath.begin(), lipath.end()); if (!m_handlers.back()->skip_to_document(vipath[m_handlers.size()-1])){ LOGERR(("FileInterner::internfile: can't skip\n")); diff --git a/src/internfile/mh_execm.cpp b/src/internfile/mh_execm.cpp index 5a477632..75373b4c 100644 --- a/src/internfile/mh_execm.cpp +++ b/src/internfile/mh_execm.cpp @@ -167,6 +167,8 @@ bool MimeHandlerExecMultiple::next_document() obuf << "Filename: " << 0 << "\n"; } if (m_ipath.length()) { + LOGDEB(("next_doc: sending len %d val [%s]\n", m_ipath.length(), + m_ipath.c_str())); obuf << "Ipath: " << m_ipath.length() << "\n" << m_ipath; } if (!m_dfltInputCharset.empty()) { diff --git a/tests/mail/mail.sh b/tests/mail/mail.sh index 71058ce3..dea527de 100755 --- a/tests/mail/mail.sh +++ b/tests/mail/mail.sh @@ -12,6 +12,7 @@ initvariables $0 recollq '"Dear Corporate Administrator"' recollq TestTbirdWithoutEmptyLine recollq TestTbirdWithEmptyLine + recollq ZIPPEDMAILDIR_UNIQUEXXX ) 2> $mystderr | egrep -v '^Recoll query: ' > $mystdout diff -w ${myname}.txt $mystdout > $mydiffs 2>&1 diff --git a/tests/mail/mail.txt b/tests/mail/mail.txt index 8dda24aa..a2a415ba 100644 --- a/tests/mail/mail.txt +++ b/tests/mail/mail.txt @@ -11,3 +11,5 @@ message/rfc822 [file:///home/dockes/projets/fulltext/testrecoll/mail/badMail.edi message/rfc822 [file:///home/dockes/projets/fulltext/testrecoll/mail/thunderbird/Sent] [Pronote: salut les genies.] 2565 bytes 1 results message/rfc822 [file:///home/dockes/projets/fulltext/testrecoll/mail/thunderbird/Sent] [De mieux en mieux] 2565 bytes +1 results +message/rfc822 [file:///home/dockes/projets/fulltext/testrecoll/mail/maildir.zip] [[FreeBSD-Announce] ZIPPEDMAILDIR_UNIQUEXXX FreeBSD Security Advisory FreeBSD-SA-04:17.procfs] 59171 bytes diff --git a/website/BUGS.html b/website/BUGS.html index 8d1cb7b1..99ed99d1 100644 --- a/website/BUGS.html +++ b/website/BUGS.html @@ -37,6 +37,11 @@

recoll 1.15

    +
  • The rclzip filter can't handle archive members with a colon + (':') in the file name or path. The files are normally indexed and + can be searched for, but they can't be displayed (neither opened + nor previewed).
  • +
  • After an upgrade, the recoll GUI sometimes crashes on startup. This is fixed by removing (back it up just in case) ~/.config/Recoll.org/recoll.conf, the QSettings storage for