fixed transcoded simple file name could not be a stored field, so undisplayable in results

This commit is contained in:
Jean-Francois Dockes 2010-09-09 08:24:31 +02:00
parent 86a4adcfe2
commit 7f71eaa8e5

View File

@ -958,6 +958,15 @@ bool Db::addOrUpdate(const string &udi, const string &parent_udi,
fn = string("XSFN") + fn;
newdocument.add_term(fn);
}
// Store utf8fn inside the metadata array as keyfn
// (="filename") so that it can be accessed by the "stored"
// processing below, without special-casing it. We only do it
// if keyfn is currently empty, because there could be a value
// already (ie for a mail attachment with a file name
// attribute)
if (doc.meta[Doc::keyfn].empty()) {
doc.meta[Doc::keyfn] = doc.utf8fn;
}
}
// Udi unique term: this is used for file existence/uptodate