Check files is valid before searching for children (EA-113417)
This commit is contained in:
@@ -64,9 +64,11 @@ class ScriptTemplatesFromDependenciesProvider(private val project: Project) : Sc
|
||||
if (!processedRoots.contains(vfile)) {
|
||||
processedRoots.add(vfile)
|
||||
val root = JarFileSystem.getInstance().getJarRootForLocalFile(vfile) ?: vfile
|
||||
root.findFileByRelativePath(templatesPath)?.takeIf { it.isDirectory }?.children?.forEach {
|
||||
if (it.isValid && !it.isDirectory && templates.add(it.name)) {
|
||||
newTemplatesFound = true
|
||||
if (root.isValid) {
|
||||
root.findFileByRelativePath(templatesPath)?.takeIf { it.isDirectory }?.children?.forEach {
|
||||
if (it.isValid && !it.isDirectory && templates.add(it.name)) {
|
||||
newTemplatesFound = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user