From 7f71eaa8e5360a1206a485a2a62e688a3ba3b1f2 Mon Sep 17 00:00:00 2001 From: Jean-Francois Dockes Date: Thu, 9 Sep 2010 08:24:31 +0200 Subject: [PATCH] fixed transcoded simple file name could not be a stored field, so undisplayable in results --- src/rcldb/rcldb.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/rcldb/rcldb.cpp b/src/rcldb/rcldb.cpp index fa883889..8f938ec4 100644 --- a/src/rcldb/rcldb.cpp +++ b/src/rcldb/rcldb.cpp @@ -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