Skip to content

Commit

Permalink
add process id to temp directory
Browse files Browse the repository at this point in the history
  • Loading branch information
Leon Pfletschinger authored and Leon Pfletschinger committed May 14, 2024
1 parent 5f65b43 commit 120c294
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/java/org/dita/dost/ant/InitializeProjectTask.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project;
import org.apache.tools.ant.Task;
import org.apache.tools.ant.util.ProcessUtil;
import org.dita.dost.log.DITAOTAntLogger;
import org.dita.dost.store.Store;
import org.dita.dost.store.StoreBuilder;
Expand Down Expand Up @@ -57,8 +58,12 @@ private Store getStore(XMLUtils xmlUtils) {
}
File tempDir = toFile(getProject().getUserProperty(ANT_TEMP_DIR));
if (tempDir == null) {
String tempDirString = getProject().getProperty(ANT_TEMP_DIR);
tempDirString = tempDirString.concat(ProcessUtil.getProcessId("001"));
getProject().setProperty(ANT_TEMP_DIR, tempDirString);
tempDir = toFile(getProject().getProperty(ANT_TEMP_DIR));
}

for (StoreBuilder storeBuilder : storeBuilderLoader) {
if (storeBuilder.getType().equals(storeType)) {
return storeBuilder.setTempDir(tempDir).setXmlUtils(xmlUtils).build();
Expand Down

0 comments on commit 120c294

Please sign in to comment.