mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-06-12 13:17:41 +02:00
Merge branch 'develop' of https://github.com/PrismLauncher/PrismLauncher into disablemods
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
@ -173,7 +173,7 @@ bool ModrinthCreationTask::createInstance()
|
||||
// Keep index file in case we need it some other time (like when changing versions)
|
||||
QString new_index_place(FS::PathCombine(parent_folder, "modrinth.index.json"));
|
||||
FS::ensureFilePathExists(new_index_place);
|
||||
QFile::rename(index_path, new_index_place);
|
||||
FS::move(index_path, new_index_place);
|
||||
|
||||
auto mcPath = FS::PathCombine(m_stagingPath, m_root_path);
|
||||
|
||||
@ -183,7 +183,7 @@ bool ModrinthCreationTask::createInstance()
|
||||
Override::createOverrides("overrides", parent_folder, override_path);
|
||||
|
||||
// Apply the overrides
|
||||
if (!QFile::rename(override_path, mcPath)) {
|
||||
if (!FS::move(override_path, mcPath)) {
|
||||
setError(tr("Could not rename the overrides folder:\n") + "overrides");
|
||||
return false;
|
||||
}
|
||||
|
@ -131,6 +131,10 @@ auto loadIndexedVersion(QJsonObject& obj) -> ModpackVersion
|
||||
|
||||
file.name = Json::requireString(obj, "name");
|
||||
file.version = Json::requireString(obj, "version_number");
|
||||
auto gameVersions = Json::ensureArray(obj, "game_versions");
|
||||
if (!gameVersions.isEmpty()) {
|
||||
file.gameVersion = Json::ensureString(gameVersions[0]);
|
||||
}
|
||||
file.version_type = ModPlatform::IndexedVersionType(Json::requireString(obj, "version_type"));
|
||||
file.changelog = Json::ensureString(obj, "changelog");
|
||||
|
||||
|
@ -84,6 +84,7 @@ struct ModpackExtra {
|
||||
struct ModpackVersion {
|
||||
QString name;
|
||||
QString version;
|
||||
QString gameVersion;
|
||||
ModPlatform::IndexedVersionType version_type;
|
||||
QString changelog;
|
||||
|
||||
|
Reference in New Issue
Block a user