Xjdk-release: avoid folder duplication

This commit is contained in:
Mikhael Bogdanov
2022-08-29 08:31:04 +02:00
committed by Space
parent 4a6609e491
commit bd6aff7f6a
@@ -33,6 +33,7 @@ class CtSymDirectoryContainer(
when { when {
child.isDirectory -> { child.isDirectory -> {
val childPackage = if (currentPackage.isEmpty()) child.name else currentPackage + "." + child.name val childPackage = if (currentPackage.isEmpty()) child.name else currentPackage + "." + child.name
var addingEntry: CtSymDirectoryContainer? = null
if (skipPackageCheck || packages.contains(childPackage)) { if (skipPackageCheck || packages.contains(childPackage)) {
containers.getOrPut(childPackage) { containers.getOrPut(childPackage) {
val list = mutableListOf<VirtualFile>() val list = mutableListOf<VirtualFile>()
@@ -43,9 +44,10 @@ class CtSymDirectoryContainer(
childPackage, childPackage,
moduleRoot, moduleRoot,
skipPackageCheck skipPackageCheck
) to list ).also { addingEntry = it } to list
}.also { it.second.add(child) }.first }.also { it.second.add(child) }
} else null }
addingEntry
} }
isExported -> CtSymClassVirtualFile(this, child) isExported -> CtSymClassVirtualFile(this, child)
else -> null else -> null