|
11 | 11 | import javafx.scene.control.ScrollPane; |
12 | 12 | import javafx.scene.layout.*; |
13 | 13 | import org.jackhuang.hmcl.game.NativesDirectoryType; |
14 | | -import org.jackhuang.hmcl.setting.Profile; |
15 | 14 | import org.jackhuang.hmcl.game.Renderer; |
| 15 | +import org.jackhuang.hmcl.setting.Profile; |
16 | 16 | import org.jackhuang.hmcl.setting.VersionSetting; |
17 | 17 | import org.jackhuang.hmcl.ui.FXUtils; |
18 | 18 | import org.jackhuang.hmcl.ui.construct.*; |
19 | 19 | import org.jackhuang.hmcl.ui.decorator.DecoratorPage; |
| 20 | +import org.jackhuang.hmcl.util.io.FileUtils; |
20 | 21 | import org.jackhuang.hmcl.util.platform.OperatingSystem; |
21 | 22 | import org.jackhuang.hmcl.util.platform.Platform; |
22 | 23 | import org.jetbrains.annotations.Nullable; |
23 | 24 |
|
| 25 | +import java.nio.file.FileSystems; |
24 | 26 | import java.util.Arrays; |
25 | 27 | import java.util.Locale; |
26 | 28 |
|
@@ -250,8 +252,8 @@ void bindProperties() { |
250 | 252 | if (versionSetting.getNativesDirType() == NativesDirectoryType.VERSION_FOLDER) { |
251 | 253 | String nativesDirName = "natives-" + Platform.SYSTEM_PLATFORM; |
252 | 254 | if (versionId == null) { |
253 | | - return String.format("%s/%s/%s", |
254 | | - profile.getRepository().getBaseDirectory().resolve("versions").toAbsolutePath().normalize(), |
| 255 | + return String.join(FileSystems.getDefault().getSeparator(), |
| 256 | + FileUtils.getAbsolutePath(profile.getRepository().getBaseDirectory().resolve("versions")), |
255 | 257 | i18n("settings.advanced.natives_directory.default.version_id"), |
256 | 258 | nativesDirName |
257 | 259 | ); |
|
0 commit comments