File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed
fj-doc-playground-quarkus/src/main/java/org/fugerit/java/doc/playground/init Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -41,14 +41,6 @@ public Response extensionsList() {
4141 );
4242 }
4343
44- private File initConfigWorker ( String base ) {
45- String tempDir = System .getProperty ("java.io.tmpdir" );
46- File outputFolder = new File ( tempDir , base +"_" + System .currentTimeMillis () );
47- outputFolder .mkdir ();
48- log .info ( "tempDir : {}, outputFolder : {}" , tempDir , outputFolder );
49- return outputFolder ;
50- }
51-
5244 @ POST
5345 @ Consumes (MediaType .APPLICATION_JSON )
5446 @ Produces (MediaType .APPLICATION_JSON )
@@ -60,7 +52,10 @@ public Response init( @Valid ProjectInitInput data ) {
6052 String groupIdData = data .getGroupId ();
6153 String artifactIdData = data .getArtifactId ();
6254 try ( ByteArrayOutputStream buffer = new ByteArrayOutputStream () ) {
63- File projectDir = this .initConfigWorker ( artifactIdData );
55+ String tempDir = System .getProperty ("java.io.tmpdir" );
56+ File projectDir = new File ( tempDir , artifactIdData +"_" + System .currentTimeMillis () );
57+ projectDir .mkdir ();
58+ log .info ( "tempDir : {}, outputFolder : {}" , tempDir , projectDir );
6459 checkIfInTempFolder ( projectDir ); // security check
6560 File realDir = new File ( projectDir , artifactIdData );
6661 checkIfInTempFolder ( realDir ); // security check
You can’t perform that action at this time.
0 commit comments