fix: prioritize .ftbapp/version.json in FTB App import
Newer versions of FTB App create a stub version.json in the instance root with only a comment directing to .ftbapp/version.json. The old logic would find this stub file first and fail to parse it, causing modpacks to not be detected. This fix checks .ftbapp/version.json first (newer location) before falling back to the root version.json (older location). Signed-off-by: Marco von Rosenberg <codingmarco@gmail.com>
This commit is contained in:
@@ -79,9 +79,9 @@ Modpack parseDirectory(QString path)
|
|||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
auto versionsFile = QFileInfo(FS::PathCombine(path, "version.json"));
|
auto versionsFile = QFileInfo(FS::PathCombine(path, ".ftbapp", "version.json"));
|
||||||
if (!versionsFile.exists() || !versionsFile.isFile()) {
|
if (!versionsFile.exists() || !versionsFile.isFile()) {
|
||||||
versionsFile = QFileInfo(FS::PathCombine(path, ".ftbapp", "version.json"));
|
versionsFile = QFileInfo(FS::PathCombine(path, "version.json"));
|
||||||
}
|
}
|
||||||
if (!versionsFile.exists() || !versionsFile.isFile()) {
|
if (!versionsFile.exists() || !versionsFile.isFile()) {
|
||||||
return {};
|
return {};
|
||||||
|
|||||||
Reference in New Issue
Block a user