Skip to content

Commit

Permalink
process only directories and jar files in plugins directory
Browse files Browse the repository at this point in the history
  • Loading branch information
unkarjedy committed Jun 7, 2024
1 parent 2919467 commit c3de748
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,10 @@ class PluginIndexImpl(ideaRoot: Path) extends PluginIndex {
}

private def buildFromPluginsDir: Map[PluginId, (Path, PluginDescriptor)] = {
val pluginDirs = Files.list(ideaRoot.resolve("plugins")).collect(Collectors.toList[Path]).asScala
val pluginDirs = Files.list(ideaRoot.resolve("plugins")).collect(Collectors.toList[Path]).asScala.filter { file =>
//extra filtering of unexpected extensions (e.g., some strange file plugin-classpath.txt)
file.isDir || file.toString.endsWith(".jar")
}
pluginDirs.flatMap { pluginDir =>
val pluginMetaData = extractPluginMetaData(pluginDir)
pluginMetaData match {
Expand Down

0 comments on commit c3de748

Please sign in to comment.