try out modification to use container file name for display, but not search, purposes when the subdocument file name is not set

This commit is contained in:
Jean-Francois Dockes
2014-07-16 17:05:26 +02:00
parent 3d3f917f59
commit 088f1f9a9f
5 changed files with 37 additions and 5 deletions
+7 -3
View File
@@ -724,9 +724,13 @@ FsIndexer::processonefile(RclConfig *config,
if (doc.url.empty())
doc.url = cstr_fileu + fn;
const string *fnp = 0;
if (doc.ipath.empty() &&
(!doc.peekmeta(Rcl::Doc::keyfn, &fnp) || fnp->empty()))
doc.meta[Rcl::Doc::keyfn] = utf8fn;
if (doc.ipath.empty()) {
if (!doc.peekmeta(Rcl::Doc::keyfn, &fnp) || fnp->empty())
doc.meta[Rcl::Doc::keyfn] = utf8fn;
} else {
// subdoc: set container file name
doc.meta[Rcl::Doc::keytcfn] = utf8fn;
}
char cbuf[100];
sprintf(cbuf, "%lld", (long long)stp->st_size);