From 4e173617d64dc1897daacc0d7691a3b208f2783a Mon Sep 17 00:00:00 2001 From: dockes Date: Sat, 16 Dec 2006 15:30:32 +0000 Subject: [PATCH] dont clobber utf8fn from filter --- src/index/indexer.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/index/indexer.cpp b/src/index/indexer.cpp index 35f760b3..52e673ce 100644 --- a/src/index/indexer.cpp +++ b/src/index/indexer.cpp @@ -1,5 +1,5 @@ #ifndef lint -static char rcsid[] = "@(#$Id: indexer.cpp,v 1.47 2006-12-15 16:33:15 dockes Exp $ (C) 2004 J.F.Dockes"; +static char rcsid[] = "@(#$Id: indexer.cpp,v 1.48 2006-12-16 15:30:32 dockes Exp $ (C) 2004 J.F.Dockes"; #endif /* * This program is free software; you can redistribute it and/or modify @@ -398,8 +398,11 @@ DbIndexer::processone(const std::string &fn, const struct stat *stp, hadNullIpath = true; else doc.ipath = ipath; - - doc.utf8fn = utf8fn; + + // Note that the filter may have its own idea of the file name + // (ie: mail attachment) + if (doc.utf8fn.empty()) + doc.utf8fn = utf8fn; // Add document to database if (!m_db.add(fn, doc, stp))