diff --git a/bin/mac/fsnotifier b/bin/mac/fsnotifier index e2524e76d1bf..d69157acdb19 100755 Binary files a/bin/mac/fsnotifier and b/bin/mac/fsnotifier differ diff --git a/native/fsNotifier/mac/fsnotifier.c b/native/fsNotifier/mac/fsnotifier.c index 0a4a6c8e1846..1f774c40c489 100644 --- a/native/fsNotifier/mac/fsnotifier.c +++ b/native/fsNotifier/mac/fsnotifier.c @@ -18,7 +18,11 @@ #include #include +#define PRIVATE_DIR "/private/" +#define PRIVATE_LEN 9 + static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER; +static bool report_private = true; static void reportEvent(char *event, char *path) { int len = 0; @@ -32,15 +36,15 @@ static void reportEvent(char *event, char *path) { } pthread_mutex_lock(&lock); - - fputs(event, stdout); - fputc('\n', stdout); - if (path != NULL) { - fwrite(path, len, 1, stdout); + if (report_private || strncasecmp(path, PRIVATE_DIR, PRIVATE_LEN) != 0) { + fputs(event, stdout); fputc('\n', stdout); + if (path != NULL) { + fwrite(path, len, 1, stdout); + fputc('\n', stdout); + } + fflush(stdout); } - - fflush(stdout); pthread_mutex_unlock(&lock); } @@ -128,14 +132,22 @@ static char command[2048]; static void ParseRoots() { CFMutableArrayRef roots = CFArrayCreateMutable(NULL, 0, NULL); + bool has_private_root = false; while (TRUE) { fscanf(stdin, "%s", command); if (strcmp(command, "#") == 0 || feof(stdin)) break; char* path = command[0] == '|' ? command + 1 : command; CFArrayAppendValue(roots, strdup(path)); + if (strcmp(path, "/") == 0 || strncasecmp(path, PRIVATE_DIR, PRIVATE_LEN) == 0) { + has_private_root = true; + } } + pthread_mutex_lock(&lock); + report_private = has_private_root; + pthread_mutex_unlock(&lock); + PrintMountedFileSystems(roots); for (int i = 0; i < CFArrayGetCount(roots); i++) { 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 d955c496deb3..f7346548124a 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 @@ -217,7 +217,7 @@ public class FileWatcher { private static boolean isUpToDate(File executable) { long length = SystemInfo.isWindows ? 71208 : - SystemInfo.isMac ? 13924 : + SystemInfo.isMac ? 13984 : SystemInfo.isLinux ? SystemInfo.isAMD64 ? 29155 : 22791 : -1; return length < 0 || length == executable.length();