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 ""
|
// over the last significant one are ""
|
||||||
// We set the ipath for the first handler here, others are set
|
// We set the ipath for the first handler here, others are set
|
||||||
// when they're pushed on the stack
|
// when they're pushed on the stack
|
||||||
vector<string> vipath(MAXHANDLERS);
|
vector<string> vipath;
|
||||||
int vipathidx = 0;
|
int vipathidx = 0;
|
||||||
if (!ipath.empty()) {
|
if (!ipath.empty()) {
|
||||||
vector<string> lipath;
|
vector<string> lipath;
|
||||||
@ -851,10 +851,19 @@ FileInterner::Status FileInterner::internfile(Rcl::Doc& doc, const string& ipath
|
|||||||
return FIError;
|
return FIError;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ipath.empty() &&
|
// If we have an ipath, meaning that we are seeking a specific
|
||||||
!m_handlers.back()->skip_to_document(vipath[m_handlers.size()-1])){
|
// document (ie: previewing a search result), we may have to
|
||||||
LOGERR(("FileInterner::internfile: can't skip\n"));
|
// seek to the correct entry of a compound doc (ie: archive or
|
||||||
return FIError;
|
// 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:
|
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
|
// Execute an external program to translate a file from its native
|
||||||
// format to text or html.
|
// format to text or html.
|
||||||
bool MimeHandlerExec::next_document()
|
bool MimeHandlerExec::next_document()
|
||||||
|
|||||||
@ -68,10 +68,7 @@ class MimeHandlerExec : public RecollFilter {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
virtual bool next_document();
|
virtual bool next_document();
|
||||||
virtual bool skip_to_document(const string& ipath) {
|
virtual bool skip_to_document(const string& ipath);
|
||||||
m_ipath = ipath;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
virtual void clear() {
|
virtual void clear() {
|
||||||
m_fn.erase();
|
m_fn.erase();
|
||||||
m_ipath.erase();
|
m_ipath.erase();
|
||||||
|
|||||||
@ -60,7 +60,8 @@ test $# -eq 1 || usage
|
|||||||
echo dotag $dotag snap $snap
|
echo dotag $dotag snap $snap
|
||||||
|
|
||||||
if test $snap = yes ; then
|
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
|
versionforcvs=$version
|
||||||
TAG=""
|
TAG=""
|
||||||
else
|
else
|
||||||
|
|||||||
@ -110,11 +110,11 @@
|
|||||||
<h3>Snapshot</h3>
|
<h3>Snapshot</h3>
|
||||||
<p>I sometimes release a source tarfile when I consider that the
|
<p>I sometimes release a source tarfile when I consider that the
|
||||||
current development version is stable enough. The current
|
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
|
<a href="https://bitbucket.org/medoc/recoll/changesets">the
|
||||||
changelog</a>, and a synthetic abstract in the
|
changelog</a>, and a synthetic abstract in the
|
||||||
current <a href="release-1.16.html">1.16 release notes</a>).
|
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>
|
<h3>Prerequisites for building from source:</h3>
|
||||||
<ul>
|
<ul>
|
||||||
|
|||||||
@ -88,6 +88,9 @@
|
|||||||
paths.</li>
|
paths.</li>
|
||||||
<li>Fixed GUI result list doc parent operations (open/preview)
|
<li>Fixed GUI result list doc parent operations (open/preview)
|
||||||
which were broken in 1.15.</li>
|
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>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user