From d3a9d09e6647d1530864d2779728a0cd1ca48903 Mon Sep 17 00:00:00 2001 From: Jarno Elovirta Date: Sun, 22 Oct 2023 17:53:07 +0300 Subject: [PATCH] Rewrite usr.input.file.list in preprocess2 cleanup Signed-off-by: Jarno Elovirta --- .../java/org/dita/dost/module/CleanPreprocessModule.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main/java/org/dita/dost/module/CleanPreprocessModule.java b/src/main/java/org/dita/dost/module/CleanPreprocessModule.java index 01d3d26fa2..499044c755 100644 --- a/src/main/java/org/dita/dost/module/CleanPreprocessModule.java +++ b/src/main/java/org/dita/dost/module/CleanPreprocessModule.java @@ -10,12 +10,14 @@ import static java.util.Collections.emptyMap; import static org.dita.dost.util.Constants.*; +import static org.dita.dost.util.Job.USER_INPUT_FILE_LIST_FILE; import static org.dita.dost.util.XMLUtils.toErrorReporter; import com.google.common.annotations.VisibleForTesting; import java.io.File; import java.io.IOException; import java.net.URI; +import java.nio.file.Files; import java.util.*; import java.util.stream.Collectors; import java.util.stream.IntStream; @@ -165,6 +167,13 @@ public AbstractPipelineOutput execute(final Map input) throws DI final FileInfo start = job.getFileInfo(f -> f.isInput).iterator().next(); if (start != null) { job.setInputMap(start.uri); + + final File inputfile = new File(job.tempDir, USER_INPUT_FILE_LIST_FILE); + try { + Files.writeString(inputfile.toPath(), start.file.getPath()); + } catch (IOException e) { + throw new RuntimeException(e); + } } try {