diff --git a/resources/inspectionDescriptions/LatexUndefinedCommand.html b/resources/inspectionDescriptions/LatexUndefinedCommand.html index fe03427e4..357552222 100644 --- a/resources/inspectionDescriptions/LatexUndefinedCommand.html +++ b/resources/inspectionDescriptions/LatexUndefinedCommand.html @@ -1,5 +1,6 @@
The command was not found in LaTeX or any included package. + This inspection is still experimental and a work in progress, so may have (many) false positives. diff --git a/src/nl/hannahsten/texifyidea/run/latex/LatexCommandLineState.kt b/src/nl/hannahsten/texifyidea/run/latex/LatexCommandLineState.kt index 8818f294e..a76e10e4b 100644 --- a/src/nl/hannahsten/texifyidea/run/latex/LatexCommandLineState.kt +++ b/src/nl/hannahsten/texifyidea/run/latex/LatexCommandLineState.kt @@ -68,6 +68,7 @@ open class LatexCommandLineState(environment: ExecutionEnvironment, private val else { setOf() } + runConfig.filesToCleanUpIfEmpty.addAll(createdOutputDirectories) val handler = createHandler(mainFile, compiler) val isMakeindexNeeded = runMakeindexIfNeeded(handler, mainFile, runConfig.filesToCleanUp) @@ -77,7 +78,7 @@ open class LatexCommandLineState(environment: ExecutionEnvironment, private val if (!isLastCompile(isMakeindexNeeded, handler)) return handler scheduleBibtexRunIfNeeded(handler) schedulePdfViewerIfNeeded(handler) - scheduleFileCleanup(runConfig.filesToCleanUp, createdOutputDirectories, handler) + scheduleFileCleanup(runConfig.filesToCleanUp, runConfig.filesToCleanUpIfEmpty, handler) return handler } diff --git a/src/nl/hannahsten/texifyidea/run/latex/LatexOutputPath.kt b/src/nl/hannahsten/texifyidea/run/latex/LatexOutputPath.kt index 7cb5f6b17..727a4c0af 100644 --- a/src/nl/hannahsten/texifyidea/run/latex/LatexOutputPath.kt +++ b/src/nl/hannahsten/texifyidea/run/latex/LatexOutputPath.kt @@ -154,6 +154,8 @@ class LatexOutputPath(private val variant: String, var contentRoot: VirtualFile? // Create output paths (see issue #70 on GitHub) files.asSequence() + // Ignore all output directories to avoid exponential recursion + .filter { !it.path.contains(outPath) } .mapNotNull { FileUtil.pathRelativeTo(includeRoot?.path ?: return@mapNotNull null, it.path) } diff --git a/src/nl/hannahsten/texifyidea/run/latex/LatexRunConfiguration.kt b/src/nl/hannahsten/texifyidea/run/latex/LatexRunConfiguration.kt index 89ccda202..3f2cd73fd 100644 --- a/src/nl/hannahsten/texifyidea/run/latex/LatexRunConfiguration.kt +++ b/src/nl/hannahsten/texifyidea/run/latex/LatexRunConfiguration.kt @@ -176,6 +176,7 @@ class LatexRunConfiguration( // In order to propagate information about which files need to be cleaned up at the end between one run of the run config // (for example makeindex) and the last run, we save this information temporarily here while the run configuration is running. val filesToCleanUp = mutableListOf