mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Cleanup (duplication)
This commit is contained in:
+2
-14
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user