mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-24 03:33:46 -04:00
Fix.
This commit is contained in:
parent
4618a51934
commit
8f664edebf
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user