Skip to content

Commit 0354f8e

Browse files
committed
Fix temp dir for project
1 parent 642e4c8 commit 0354f8e

File tree

1 file changed

+3
-3
lines changed
  • fj-doc-playground-quarkus/src/main/java/org/fugerit/java/doc/playground/init

1 file changed

+3
-3
lines changed

fj-doc-playground-quarkus/src/main/java/org/fugerit/java/doc/playground/init/ProjectRest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ public Response extensionsList() {
4040
);
4141
}
4242

43-
private File initConfigWorker() {
43+
private File initConfigWorker( String base ) {
4444
String tempDir = System.getProperty("java.io.tmpdir");
45-
File outputFolder = new File( tempDir, "init_"+ UUID.randomUUID().toString() );
45+
File outputFolder = new File( tempDir, base+"_"+ System.currentTimeMillis() );
4646
outputFolder.mkdir();
4747
log.info( "tempDir : {}, outputFolder : {}", tempDir, outputFolder);
4848
return outputFolder;
@@ -57,7 +57,7 @@ public Response init( ProjectInitInput input) {
5757
long time = System.currentTimeMillis();
5858
ProjectInitOutput output = new ProjectInitOutput();
5959
try ( ByteArrayOutputStream buffer = new ByteArrayOutputStream() ) {
60-
File projectDir = this.initConfigWorker();
60+
File projectDir = this.initConfigWorker( input.getArtifactId() );
6161
File realDir = new File( projectDir, input.getArtifactId() );
6262
log.info( "project init folder : {}", realDir.getAbsolutePath() );
6363
MojoInit mojoInit = new MojoInit() {

0 commit comments

Comments
 (0)