From a5b8a7dfc90040f943346cafd54382fadbd62a13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Wed, 6 Aug 2008 20:22:50 +0000 Subject: [PATCH] Handle removed files. * On Haiku, this will make them disappear from the results list. * On BeOS, it will only work around the problem that we don't know which file was removed from the node monitoring message... git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26848 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/text_search/Grepper.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/apps/text_search/Grepper.cpp b/src/apps/text_search/Grepper.cpp index d65019d7d9..7a1d5a8001 100644 --- a/src/apps/text_search/Grepper.cpp +++ b/src/apps/text_search/Grepper.cpp @@ -188,8 +188,13 @@ Grepper::_GrepperThread() message.MakeEmpty(); message.what = MSG_REPORT_RESULT; message.AddString("filename", fileName); - + BEntry entry(fileName); + if (!entry.Exists()) { + if (fIterator->NotifyNegatives()) + fTarget.SendMessage(&message); + continue; + } entry_ref ref; entry.GetRef(&ref); message.AddRef("ref", &ref);