From 61042ec16da9274624465f44efa32fcf4f89b8a3 Mon Sep 17 00:00:00 2001 From: Jean-Francois Dockes Date: Sun, 18 Mar 2012 15:18:10 +0100 Subject: [PATCH] command line: fix recollq to compute title-or-filename now that filename is not used as title by default any more --- src/query/recollq.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/query/recollq.cpp b/src/query/recollq.cpp index 917a2c55..5f6ff546 100644 --- a/src/query/recollq.cpp +++ b/src/query/recollq.cpp @@ -355,12 +355,16 @@ int recollq(RclConfig **cfp, int argc, char **argv) if (op_flags & OPT_b) { cout << doc.url << endl; } else { + string titleorfn = doc.meta[Rcl::Doc::keytt]; + if (titleorfn.empty()) + titleorfn = doc.meta[Rcl::Doc::keyfn]; + char cpc[20]; sprintf(cpc, "%d", doc.pc); cout << doc.mimetype << "\t" << "[" << doc.url << "]" << "\t" - << "[" << doc.meta[Rcl::Doc::keytt] << "]" << "\t" + << "[" << titleorfn << "]" << "\t" << doc.fbytes << "\tbytes" << "\t" << endl; if (op_flags & OPT_m) {