From ed71cf97329e88747dd85186455712a4876986c8 Mon Sep 17 00:00:00 2001 From: Roman Shevchenko Date: Thu, 24 Nov 2016 18:40:36 +0100 Subject: [PATCH] Cleanup (duplication) --- .../vfs/newvfs/persistent/RefreshWorker.java | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/persistent/RefreshWorker.java b/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/persistent/RefreshWorker.java index 18b1d54dd47d..af90650821fe 100644 --- a/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/persistent/RefreshWorker.java +++ b/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/persistent/RefreshWorker.java @@ -76,23 +76,11 @@ public class RefreshWorker { } public void scan() { - NewVirtualFile root = myRefreshQueue.pullFirst().first; - boolean rootDirty = root.isDirty(); - if (LOG.isDebugEnabled()) LOG.debug("root=" + root + " dirty=" + rootDirty); - if (!rootDirty) return; - + NewVirtualFile root = myRefreshQueue.peekFirst().first; NewVirtualFileSystem fs = root.getFileSystem(); - FileAttributes rootAttributes = fs.getAttributes(root); - if (rootAttributes == null) { - scheduleDeletion(root); - root.markClean(); - return; - } - else if (rootAttributes.isDirectory()) { + if (root.isDirectory()) { fs = PersistentFS.replaceWithNativeFS(fs); } - - myRefreshQueue.addLast(pair(root, rootAttributes)); try { processQueue(fs, PersistentFS.getInstance()); }