mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-16 10:55:01 -04:00
fix assets on windows
Windows uses drive letters and backspaces, hence it breaks a lot.
This commit is contained in:
parent
94954657ca
commit
44813001a1
@ -58,7 +58,7 @@ class DirectoryAssetsManager(
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if (root) continue // root path just allows folders
|
if (root) continue // root path just allows folders
|
||||||
val path = file.toPath().relativeTo(basePath).toString().removePrefix(File.separator).toAssetName(false, prefix) ?: continue
|
val path = file.toPath().relativeTo(basePath).toString().replace("\\", "/").removePrefix("/").toAssetName(false, prefix) ?: continue
|
||||||
assets += path
|
assets += path
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Minosoft
|
* Minosoft
|
||||||
* Copyright (C) 2020-2023 Moritz Zwerger
|
* Copyright (C) 2020-2024 Moritz Zwerger
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
@ -33,7 +33,7 @@ object ResourcesAssetsUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return when (rootResources.protocol) {
|
return when (rootResources.protocol) {
|
||||||
"file" -> DirectoryAssetsManager(Path.of(rootResources.path).parent, canUnload, prefix) // Read them directly from the folder
|
"file" -> DirectoryAssetsManager(Path.of(rootResources.toURI()).parent, canUnload, prefix) // Read them directly from the folder
|
||||||
"jar" -> {
|
"jar" -> {
|
||||||
val path: String = rootResources.path
|
val path: String = rootResources.path
|
||||||
val jarPath = path.substring(5, path.indexOf("!"))
|
val jarPath = path.substring(5, path.indexOf("!"))
|
||||||
|
@ -32,7 +32,7 @@ class UpdaterC(profile: OtherProfile) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Update channel
|
* Update channel
|
||||||
* If automatic, it chooses either stable or beta matching the current executed version
|
* If set to `auto`, it will download the update from the same branch as the running version
|
||||||
*/
|
*/
|
||||||
var channel by StringDelegate(profile, "auto")
|
var channel by StringDelegate(profile, "auto")
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user