1
0
mirror of https://github.com/packwiz/packwiz.git synced 2025-05-03 11:06:30 +02:00

Fix installing without file ID, with no version data in latestfiles

This commit is contained in:
comp500 2022-05-03 21:09:41 +01:00
parent efb434dadc
commit d7bfed5cb3

@ -366,7 +366,11 @@ func getLatestFile(modInfoData modInfo, mcVersion string, fileID int, packLoader
if !anyFileObtained {
return modFileInfo{}, fmt.Errorf("addon %d has no files", modInfoData.ID)
}
return modFileInfo{}, errors.New("mod not available for the configured Minecraft version(s) (use the acceptable-game-versions option to accept more) or loader")
// Possible to reach this point without obtaining file info; particularly from GameVersionLatestFiles
if fileID == 0 {
return modFileInfo{}, errors.New("mod not available for the configured Minecraft version(s) (use the acceptable-game-versions option to accept more) or loader")
}
}
fileInfoData, err := getFileInfo(modInfoData.ID, fileID)