Bludgeon Basic:DeleteFile test is showing beagled leaking fd's like there's no tomorrow, this is because one codepath in DoQuery bypasses the Lucene cleanup part. --- beagled/LuceneQueryingDriver.cs.orig 2005-10-03 18:08:38.000000000 +0100 +++ beagled/LuceneQueryingDriver.cs 2005-10-03 18:09:04.000000000 +0100 @@ -303,21 +303,21 @@ namespace Beagle.Daemon { sw.Reset (); sw.Start (); - // If we didn't get any matches, give up. - if (primary_matches == null || ! primary_matches.ContainsTrue ()) - return; + // Only generate results if we got some matches + if (primary_matches != null && primary_matches.ContainsTrue ()) { + GenerateQueryResults (primary_reader, + primary_searcher, + secondary_searcher, + primary_matches, + result, + term_list, + query.MaxHits, + DateTime.MinValue, + DateTime.MaxValue, + uri_filter, + hit_filter); + } - GenerateQueryResults (primary_reader, - primary_searcher, - secondary_searcher, - primary_matches, - result, - term_list, - query.MaxHits, - DateTime.MinValue, - DateTime.MaxValue, - uri_filter, - hit_filter); // // Finally, we clean up after ourselves. //