From fa213634c125d1d1ca1de32b926ea5533a482b2d Mon Sep 17 00:00:00 2001 From: Tom Lundell Date: Mon, 4 Apr 2016 17:10:23 -0400 Subject: [PATCH] Fix incorrect manual watch root calculations. Previously, if these were met: * You have more than one file watcher, and * One of the file watchers have unwatchable roots, and * Some other file watcher can watch everything You would get spurious "Cannot be watched" notifications and manual watch roots from the system. --- .../src/com/intellij/openapi/vfs/impl/local/FileWatcher.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/platform/platform-impl/src/com/intellij/openapi/vfs/impl/local/FileWatcher.java b/platform/platform-impl/src/com/intellij/openapi/vfs/impl/local/FileWatcher.java index 4e9be517b011..85a570c1547f 100644 --- a/platform/platform-impl/src/com/intellij/openapi/vfs/impl/local/FileWatcher.java +++ b/platform/platform-impl/src/com/intellij/openapi/vfs/impl/local/FileWatcher.java @@ -184,9 +184,7 @@ public class FileWatcher { @Override public void notifyManualWatchRoots(@NotNull Collection roots) { - if (!roots.isEmpty()) { - myManualWatchRoots.add(ContainerUtil.newHashSet(roots)); - } + myManualWatchRoots.add(ContainerUtil.newHashSet(roots)); notifyOnAnyEvent(); }