diff --git a/platform/lang-impl/src/com/intellij/ide/projectView/impl/ProjectViewInplaceCommentProducerImpl.kt b/platform/lang-impl/src/com/intellij/ide/projectView/impl/ProjectViewInplaceCommentProducerImpl.kt
index 710a0f478a8f..8977d9ba8349 100644
--- a/platform/lang-impl/src/com/intellij/ide/projectView/impl/ProjectViewInplaceCommentProducerImpl.kt
+++ b/platform/lang-impl/src/com/intellij/ide/projectView/impl/ProjectViewInplaceCommentProducerImpl.kt
@@ -84,6 +84,7 @@ internal fun appendVfsInfo(node: ProjectViewNode<*>, appender: InplaceCommentApp
count++
count < showCachedChildrenLimit
}
+ count-- // don't count the directory itself
val countString = if (count <= showCachedChildrenLimit) count.toString() else "$count+"
appender.append(" $countString VFS ${if (count == 1) "file" else "files"}", SimpleTextAttributes.GRAYED_SMALL_ATTRIBUTES)
}
diff --git a/platform/lang-impl/src/com/intellij/internal/CountVfsFileChildrenAction.kt b/platform/lang-impl/src/com/intellij/internal/CountVfsFileChildrenAction.kt
index 10f1ef5bf49b..d6bf7b1f25d4 100644
--- a/platform/lang-impl/src/com/intellij/internal/CountVfsFileChildrenAction.kt
+++ b/platform/lang-impl/src/com/intellij/internal/CountVfsFileChildrenAction.kt
@@ -49,6 +49,7 @@ internal class CountVfsFileChildrenAction : AnAction(), DumbAware {
return true
}
})
+ filesOnDiskCount-- // don't count the directory itself
val message = "Under ${root.path}
" +
"there are $filesOnDiskCount files on disk"
Notification("System Messages", message, NotificationType.INFORMATION)
@@ -75,6 +76,7 @@ internal class CountVfsFileChildrenAction : AnAction(), DumbAware {
}
true
}
+ vfsFilesCount-- // don't count the directory itself
val message = "Under ${root.path}
" +
"there are $vfsFilesCount files in VFS:
" +
"$contentFilesCount content files
" +