Skip to content

Commit

Permalink
Merge pull request dita-ot#4311 from dita-ot/feature/fix-list-file-up…
Browse files Browse the repository at this point in the history
…date-preprocess2

Rewrite usr.input.file.list in preprocess2 cleanup
  • Loading branch information
jelovirt authored Oct 23, 2023
2 parents 7a09255 + d3a9d09 commit b6de38e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/main/java/org/dita/dost/module/CleanPreprocessModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -165,6 +167,13 @@ public AbstractPipelineOutput execute(final Map<String, String> 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 {
Expand Down

0 comments on commit b6de38e

Please sign in to comment.