From e83faa473bf057e6fff20a0857b2595fb5bcc5fe Mon Sep 17 00:00:00 2001 From: Maxim Shafirov Date: Thu, 19 Nov 2009 14:12:15 +0300 Subject: [PATCH] Bypass adding watch roots if the FileWatcher is not available since they're not needed in this case anyway. --- .../intellij/openapi/vfs/impl/local/LocalFileSystemImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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();