in src/main/kotlin/rules_intellij/indexing/OnDiskSharedIndexChunkLocator.kt [46:63]
override fun downloadChunk(targetFile: Path,
project: Project?,
indicator: ProgressIndicator): Boolean {
indicator.text = SharedIndexesBundle.message("configuring.shared.indexes")
indicator.isIndeterminate = true
LOG.warn("Shared Index $myIndexZip is requested by the IDE")
return try {
myIndexZip.copy(targetFile)
val size = Files.size(targetFile)
// We don't have kinds for local indexes. Let's consider it is "project"
reportLocalIndexLoaded(project, "project", chunkUniqueId, size)
true
} catch (t: Throwable) {
if (t is ControlFlowException) ExceptionUtil.rethrow(t)
LOG.warn("Failed to copy shared index from $myIndexZip to $targetFile")
false
}
}