From 44403a761f6ee7943bca2ceb3c0d47cebd7fd552 Mon Sep 17 00:00:00 2001 From: Roman Shevchenko Date: Wed, 18 Apr 2012 17:12:07 +0200 Subject: [PATCH] Start file watcher correctly; log something if it fails --- .../com/intellij/openapi/vfs/impl/local/FileWatcher.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 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 8600cec9d6aa..7f4d1879d6ac 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 @@ -97,7 +97,9 @@ public class FileWatcher { startupProcess(false); } } - catch (IOException ignore) { } + catch (IOException e) { + LOG.warn(e.getMessage()); + } if (notifierProcess != null) { LOG.info("Native file watcher is operational."); @@ -228,7 +230,7 @@ public class FileWatcher { } LOG.info("Starting file watcher: " + executable); - notifierProcess = Runtime.getRuntime().exec(executable.getAbsolutePath()); + notifierProcess = Runtime.getRuntime().exec(new String[]{executable.getAbsolutePath()}); notifierReader = new BufferedReader(new InputStreamReader(notifierProcess.getInputStream())); notifierWriter = new BufferedWriter(new OutputStreamWriter(notifierProcess.getOutputStream()));