Don't include containing directory into the children file count

GitOrigin-RevId: ce73105e38e9df50d970d29e456d25e03a2dda41
This commit is contained in:
Liudmila Kornilova
2025-08-28 19:37:49 +00:00
committed by intellij-monorepo-bot
parent bd41da7e0b
commit ced16698e8
2 changed files with 3 additions and 0 deletions
@@ -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)
}
@@ -49,6 +49,7 @@ internal class CountVfsFileChildrenAction : AnAction(), DumbAware {
return true
}
})
filesOnDiskCount-- // don't count the directory itself
val message = "Under <i>${root.path}</i><br/>" +
"there are $filesOnDiskCount files on <b>disk</b>"
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 <i>${root.path}</i><br/>" +
"there are $vfsFilesCount files in <b>VFS</b>:<br/>" +
"$contentFilesCount content files<br/>" +