Fix internfile bug which prevented the propagation of a proper title in some cases
This commit is contained in:
parent
844b4e8b03
commit
47ea12353a
@ -562,13 +562,13 @@ bool FileInterner::dijontorcl(Rcl::Doc& doc)
|
||||
const string *val = 0;
|
||||
if (!doc.peekmeta(Rcl::Doc::keymd5, &val) || val->empty())
|
||||
doc.meta[Rcl::Doc::keymd5] = ent.second;
|
||||
} else if (ent.first == cstr_dj_keymt ||
|
||||
ent.first == cstr_dj_keycharset) {
|
||||
} else if (ent.first == cstr_dj_keymt || ent.first == cstr_dj_keycharset) {
|
||||
// don't need/want these.
|
||||
} else {
|
||||
LOGDEB2("dijontorcl: " << m_cfg->fieldCanon(ent.first) << " -> " <<
|
||||
ent.second << endl);
|
||||
doc.addmeta(m_cfg->fieldCanon(ent.first), ent.second);
|
||||
LOGDEB2("dijontorcl: " << m_cfg->fieldCanon(ent.first) << " -> " << ent.second << "\n");
|
||||
if (!ent.second.empty()) {
|
||||
doc.meta[m_cfg->fieldCanon(ent.first)] = ent.second;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (doc.meta[Rcl::Doc::keyabs].empty() &&
|
||||
@ -583,7 +583,7 @@ const set<string> nocopyfields{cstr_dj_keycontent, cstr_dj_keymd,
|
||||
cstr_dj_keyanc, cstr_dj_keyorigcharset, cstr_dj_keyfn,
|
||||
cstr_dj_keymt, cstr_dj_keycharset, cstr_dj_keyds};
|
||||
|
||||
static void copymeta(const RclConfig *cfg,Rcl::Doc& doc, const RecollFilter* hp)
|
||||
static void copymeta(const RclConfig *cfg, Rcl::Doc& doc, const RecollFilter* hp)
|
||||
{
|
||||
for (const auto& entry : hp->get_meta_data()) {
|
||||
if (nocopyfields.find(entry.first) == nocopyfields.end()) {
|
||||
@ -650,7 +650,7 @@ void FileInterner::collectIpathAndMT(Rcl::Doc& doc) const
|
||||
// handlers to use setfield() instead of embedding
|
||||
// metadata in the HTML meta tags.
|
||||
if (i == 0 || !pathelprev.empty()) {
|
||||
copymeta(m_cfg, doc, m_handlers[i]);
|
||||
copymeta(m_cfg, doc, m_handlers[i == 0 ? 0 : i-1]);
|
||||
}
|
||||
if (doc.fbytes.empty()) {
|
||||
lltodecstr(m_handlers[i]->get_docsize(), doc.fbytes);
|
||||
@ -744,8 +744,7 @@ int FileInterner::addHandler()
|
||||
LOGINFO("FileInterner::addHandler: no filter for [" << mimetype << "]\n");
|
||||
return ADD_CONTINUE;
|
||||
}
|
||||
newflt->set_property(Dijon::Filter::OPERATING_MODE,
|
||||
m_forPreview ? "view" : "index");
|
||||
newflt->set_property(Dijon::Filter::OPERATING_MODE, m_forPreview ? "view" : "index");
|
||||
if (!charset.empty())
|
||||
newflt->set_property(Dijon::Filter::DEFAULT_CHARSET, charset);
|
||||
|
||||
|
||||
@ -1 +1 @@
|
||||
FreqFor maildir_uniquexxx : 692
|
||||
FreqFor maildir_uniquexxx : 734
|
||||
|
||||
@ -1,2 +1,2 @@
|
||||
1 results
|
||||
application/msword [file:///home/dockes/projets/fulltext/testrecoll/embed/thunderbirdlocalfolders.zip] [xingfx1.doc] 24576 bytes
|
||||
application/msword [file:///home/dockes/projets/fulltext/testrecoll/embed/thunderbirdlocalfolders.zip] [xingfx1.doc (Sending a word document)] 24576 bytes
|
||||
|
||||
@ -1,2 +1,2 @@
|
||||
1 results
|
||||
text/plain [file:///home/dockes/projets/fulltext/testrecoll/orgmode/orgmode-example.org] [law and legal code versioned on github] 370 bytes
|
||||
text/x-orgmode-sub [file:///home/dockes/projets/fulltext/testrecoll/orgmode/orgmode-example.org] [law and legal code versioned on github] 487 bytes
|
||||
|
||||
@ -2,5 +2,5 @@
|
||||
0 results
|
||||
0 results
|
||||
2 results
|
||||
application/octet-stream [file:///home/dockes/projets/fulltext/testrecoll/rfc2231/thunder] [épatantuniquefilenameterm.bin (vrai attach)] 5785 bytes
|
||||
message/rfc822 [file:///home/dockes/projets/fulltext/testrecoll/rfc2231/thunder] [vrai attach] 11208 bytes
|
||||
application/octet-stream [file:///home/dockes/projets/fulltext/testrecoll/rfc2231/thunder] [épatantuniquefilenameterm.bin] 5785 bytes
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user