mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-10-05 08:49:15 +00:00
Merge branch '3.5.x' into 4.0.x
Closes gh-50089
This commit is contained in:
+2
-1
@@ -16,6 +16,7 @@
|
||||
|
||||
package org.springframework.boot.cli.command.init;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.URI;
|
||||
import java.nio.charset.Charset;
|
||||
@@ -243,7 +244,7 @@ class InitializrService {
|
||||
value = value.substring(start + FILENAME_HEADER_PREFIX.length());
|
||||
int end = value.indexOf('\"');
|
||||
if (end != -1) {
|
||||
return value.substring(0, end);
|
||||
return new File(value.substring(0, end)).getName();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -137,7 +137,7 @@ class ProjectGenerator {
|
||||
}
|
||||
|
||||
private void writeProject(ProjectGenerationResponse entity, String output, boolean overwrite) throws IOException {
|
||||
File outputFile = new File(output);
|
||||
File outputFile = new File(System.getProperty("user.dir"), output);
|
||||
if (outputFile.exists()) {
|
||||
if (!overwrite) {
|
||||
throw new ReportableException(
|
||||
|
||||
Reference in New Issue
Block a user