Gui preview, internfile: handle case where target doc of a compound ipath still needs further translation (is not text or html)
This commit is contained in:
parent
f4c1c3678d
commit
2d8e57ee4f
@ -768,7 +768,7 @@ FileInterner::Status FileInterner::internfile(Rcl::Doc& doc, const string& ipath
|
||||
// over the last significant one are ""
|
||||
// We set the ipath for the first handler here, others are set
|
||||
// when they're pushed on the stack
|
||||
vector<string> vipath(MAXHANDLERS);
|
||||
vector<string> vipath;
|
||||
int vipathidx = 0;
|
||||
if (!ipath.empty()) {
|
||||
vector<string> lipath;
|
||||
@ -851,10 +851,19 @@ FileInterner::Status FileInterner::internfile(Rcl::Doc& doc, const string& ipath
|
||||
return FIError;
|
||||
}
|
||||
|
||||
if (!ipath.empty() &&
|
||||
!m_handlers.back()->skip_to_document(vipath[m_handlers.size()-1])){
|
||||
LOGERR(("FileInterner::internfile: can't skip\n"));
|
||||
return FIError;
|
||||
// If we have an ipath, meaning that we are seeking a specific
|
||||
// document (ie: previewing a search result), we may have to
|
||||
// seek to the correct entry of a compound doc (ie: archive or
|
||||
// mail). When we are out of ipath entries, we stop seeking,
|
||||
// the handlers stack may still grow for translation (ie: if
|
||||
// the target doc is msword, we'll still stack the
|
||||
// word-to-text translator).
|
||||
if (!ipath.empty()) {
|
||||
if (m_handlers.size() <= vipath.size() &&
|
||||
!m_handlers.back()->skip_to_document(vipath[m_handlers.size()-1])) {
|
||||
LOGERR(("FileInterner::internfile: can't skip\n"));
|
||||
return FIError;
|
||||
}
|
||||
}
|
||||
}
|
||||
breakloop:
|
||||
|
||||
@ -59,6 +59,13 @@ public:
|
||||
};
|
||||
|
||||
|
||||
bool MimeHandlerExec::skip_to_document(const string& ipath)
|
||||
{
|
||||
LOGDEB(("MimeHandlerExec:skip_to_document: [%s]\n", ipath.c_str()));
|
||||
m_ipath = ipath;
|
||||
return true;
|
||||
}
|
||||
|
||||
// Execute an external program to translate a file from its native
|
||||
// format to text or html.
|
||||
bool MimeHandlerExec::next_document()
|
||||
|
||||
@ -68,10 +68,7 @@ class MimeHandlerExec : public RecollFilter {
|
||||
return true;
|
||||
}
|
||||
virtual bool next_document();
|
||||
virtual bool skip_to_document(const string& ipath) {
|
||||
m_ipath = ipath;
|
||||
return true;
|
||||
}
|
||||
virtual bool skip_to_document(const string& ipath);
|
||||
virtual void clear() {
|
||||
m_fn.erase();
|
||||
m_ipath.erase();
|
||||
|
||||
@ -60,7 +60,8 @@ test $# -eq 1 || usage
|
||||
echo dotag $dotag snap $snap
|
||||
|
||||
if test $snap = yes ; then
|
||||
version=`hg id | awk '{print $1}'`
|
||||
# version=`hg id | awk '{print $1}'`
|
||||
version=`hg summary | head -1 | awk -F: '{print $2}' | sed -e 's/ //g'`
|
||||
versionforcvs=$version
|
||||
TAG=""
|
||||
else
|
||||
|
||||
@ -110,11 +110,11 @@
|
||||
<h3>Snapshot</h3>
|
||||
<p>I sometimes release a source tarfile when I consider that the
|
||||
current development version is stable enough. The current
|
||||
snapshot contains commits up to 2237 (see
|
||||
snapshot contains commits up to 2240 (see
|
||||
<a href="https://bitbucket.org/medoc/recoll/changesets">the
|
||||
changelog</a>, and a synthetic abstract in the
|
||||
current <a href="release-1.16.html">1.16 release notes</a>).
|
||||
<p><a href="betarecoll-6fb3a7b06269.tar.gz">betarecoll-6fb3a7b06269.tar.gz</a>.</p>
|
||||
<p><a href="betarecoll-2240.tar.gz">betarecoll-2240.tar.gz</a>.</p>
|
||||
|
||||
<h3>Prerequisites for building from source:</h3>
|
||||
<ul>
|
||||
|
||||
@ -88,6 +88,9 @@
|
||||
paths.</li>
|
||||
<li>Fixed GUI result list doc parent operations (open/preview)
|
||||
which were broken in 1.15.</li>
|
||||
<li>Fixed case where indexing could hang or crash after an
|
||||
error occured while indexing an archive member (which
|
||||
should have affected only the relevant document).</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user