diff --git a/src/main/kotlin/org/arend/util/VirtualFileUtils.kt b/src/main/kotlin/org/arend/util/VirtualFileUtils.kt index 704a3003b..e13faf0be 100644 --- a/src/main/kotlin/org/arend/util/VirtualFileUtils.kt +++ b/src/main/kotlin/org/arend/util/VirtualFileUtils.kt @@ -1,5 +1,6 @@ package org.arend.util +import com.intellij.openapi.application.ApplicationManager import com.intellij.openapi.vfs.JarFileSystem import com.intellij.openapi.vfs.VfsUtil import com.intellij.openapi.vfs.VirtualFile @@ -42,7 +43,13 @@ fun VirtualFile.getRelativeFile(path: Collection, ext: String = "", crea val VirtualFile.configFile: VirtualFile? get() = when { - isDirectory -> findChild(FileUtils.LIBRARY_CONFIG_FILE) + isDirectory -> { + var configFile: VirtualFile? = null + ApplicationManager.getApplication().executeOnPooledThread { + configFile = findChild(FileUtils.LIBRARY_CONFIG_FILE) + }.get() + configFile + } name == FileUtils.LIBRARY_CONFIG_FILE -> this name.endsWith(FileUtils.ZIP_EXTENSION) -> JarFileSystem.getInstance().getJarRootForLocalFile(this)?.findChild(FileUtils.LIBRARY_CONFIG_FILE) else -> null