Don't send B_ENTRY_MOVED messages twice, if fromDirectory == toDirectory.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20232 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2007-02-26 00:57:45 +00:00
parent a090257d09
commit c2f0ee7a7b

View File

@ -837,8 +837,10 @@ notify_entry_moved(mount_id device, vnode_id fromDirectory,
get_interested_monitor_listeners(device, fromDirectory, B_WATCH_DIRECTORY,
interestedListeners, interestedListenerCount);
// ... for the target directory
get_interested_monitor_listeners(device, toDirectory, B_WATCH_DIRECTORY,
interestedListeners, interestedListenerCount);
if (toDirectory != fromDirectory) {
get_interested_monitor_listeners(device, toDirectory, B_WATCH_DIRECTORY,
interestedListeners, interestedListenerCount);
}
if (interestedListenerCount == 0)
return B_OK;