mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Optimization: don't use FileUtil.pathsEqual() , paths returned by FileWatcher is already canonical.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user