This commit is contained in:
burningtnt 2025-08-07 22:50:11 +08:00
parent 4618a51934
commit 8f664edebf
No known key found for this signature in database
GPG Key ID: 18A43F21F9ACE8C4
4 changed files with 8 additions and 2 deletions

View File

@ -267,6 +267,7 @@ public class TerracottaControllerPage extends StackPane {
status.textProperty().bind(statusProperty);
JFXProgressBar progress = new JFXProgressBar();
progress.progressProperty().bind(progressProperty);
progress.setMaxWidth(Double.MAX_VALUE);
statusPane.getChildren().setAll(status, progress);
}

View File

@ -39,4 +39,9 @@ public final class TerracottaMetadata {
return null;
}
}
public static String getFileName(URI uri) {
String p = uri.getPath();
return p.substring(p.lastIndexOf('/') + 1);
}
}

View File

@ -26,7 +26,7 @@ public final class GeneralProvider implements ITerracottaProvider {
).get(Platform.SYSTEM_PLATFORM);
private static final Path PATH = TARGET != null ? Metadata.DEPENDENCIES_DIRECTORY.resolve(String.format(
"terracota/%s/%s", TerracottaMetadata.VERSION, Path.of(TARGET.get(0).getPath()).getFileName()
"terracota/%s/%s", TerracottaMetadata.VERSION, TerracottaMetadata.getFileName(TARGET.get(0))
)).toAbsolutePath() : null;
@Override

View File

@ -37,7 +37,7 @@ public final class MacOSProvider implements ITerracottaProvider {
}
private static final Path PATH = BINARY != null ? Metadata.DEPENDENCIES_DIRECTORY.resolve(String.format(
"terracota/%s/%s", TerracottaMetadata.VERSION, Path.of(BINARY.get(0).getPath()).getFileName()
"terracota/%s/%s", TerracottaMetadata.VERSION, TerracottaMetadata.getFileName(BINARY.get(0))
)).toAbsolutePath() : null;
@Override