From cbff339ddbc313e520709a592d7a983185c299a9 Mon Sep 17 00:00:00 2001 From: Sergey Evdokimov Date: Thu, 10 Oct 2013 20:23:03 +0400 Subject: [PATCH] Optimization: don't use FileUtil.pathsEqual() , paths returned by FileWatcher is already canonical. --- .../com/intellij/openapi/vfs/impl/local/FileWatcher.java | 6 +++--- 1 file changed, 3 insertions(+), 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 09ca88b9fc7f..f49fd3a1345f 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 @@ -377,13 +377,13 @@ public class FileWatcher { if (fastPath && !changedPaths.isEmpty()) break; for (String root : flatWatchRoots) { - if (FileUtil.pathsEqual(path, root)) { + if (FileUtil.namesEqual(path, root)) { changedPaths.add(path); continue ext; } if (isExact) { String parentPath = new File(path).getParent(); - if (parentPath != null && FileUtil.pathsEqual(parentPath, root)) { + if (parentPath != null && FileUtil.namesEqual(parentPath, root)) { changedPaths.add(path); continue ext; } @@ -397,7 +397,7 @@ public class FileWatcher { } if (!isExact) { String parentPath = new File(root).getParent(); - if (parentPath != null && FileUtil.pathsEqual(path, parentPath)) { + if (parentPath != null && FileUtil.namesEqual(path, parentPath)) { changedPaths.add(root); continue ext; }