proper enter bulk mode by fixing calculation of number of created directoriesd when created directory does not exist (VirtualFileCreateEvent has null file but proper directory flag)

This commit is contained in:
Maxim.Mossienko
2013-10-17 19:44:45 +02:00
parent 17736e9e63
commit d0db9be2c4
@@ -354,7 +354,11 @@ public class DirectoryIndexImpl extends DirectoryIndex {
}
} else if(event instanceof VFileCreateEvent) {
VirtualFile file = event.getFile();
if (file != null && file.isDirectory()) directoriesCreated += 1 + countDirectories(file, MAX_DEPTH_TO_COUNT);
if (file != null && file.isDirectory() ||
file == null && ((VFileCreateEvent)event).isDirectory()
) {
directoriesCreated += 1 + countDirectories(file, MAX_DEPTH_TO_COUNT);
}
}
}