diff --git a/platform/platform-impl/src/com/intellij/openapi/vfs/impl/local/LocalFileSystemImpl.java b/platform/platform-impl/src/com/intellij/openapi/vfs/impl/local/LocalFileSystemImpl.java index 31c2208ee8c8..f39fae603943 100644 --- a/platform/platform-impl/src/com/intellij/openapi/vfs/impl/local/LocalFileSystemImpl.java +++ b/platform/platform-impl/src/com/intellij/openapi/vfs/impl/local/LocalFileSystemImpl.java @@ -311,7 +311,7 @@ public final class LocalFileSystemImpl extends LocalFileSystemBase implements Ap } public WatchRequest addRootToWatch(@NotNull String rootPath, boolean toWatchRecursively) { - if (rootPath.length() == 0) return null; + if (rootPath.length() == 0 || !FileWatcher.getInstance().isOperational()) return null; WRITE_LOCK.lock(); try { @@ -346,6 +346,8 @@ public final class LocalFileSystemImpl extends LocalFileSystemBase implements Ap @NotNull public Set addRootsToWatch(@NotNull final Collection rootPaths, final boolean toWatchRecursively) { + if (!FileWatcher.getInstance().isOperational()) return Collections.emptySet(); + Set result = new HashSet(); Set filesToSynchronize = new HashSet();