mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 01:54:20 +03:00
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> Signed-off-by: Charlie <u7919347@anu.edu.au>
This commit is contained in:
parent
8b5e91920d
commit
bd49dc4e7b
1 changed files with 2 additions and 2 deletions
|
|
@ -79,9 +79,9 @@ Modpack parseDirectory(QString path)
|
|||
return {};
|
||||
}
|
||||
|
||||
auto versionsFile = QFileInfo(FS::PathCombine(path, "version.json"));
|
||||
auto versionsFile = QFileInfo(FS::PathCombine(path, ".ftbapp", "version.json"));
|
||||
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()) {
|
||||
return {};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue