mirror of
https://github.com/packwiz/packwiz.git
synced 2025-10-14 15:04:32 +02:00
Fix installing without file ID, with no version data in latestfiles
This commit is contained in:
@@ -366,8 +366,12 @@ func getLatestFile(modInfoData modInfo, mcVersion string, fileID int, packLoader
|
|||||||
if !anyFileObtained {
|
if !anyFileObtained {
|
||||||
return modFileInfo{}, fmt.Errorf("addon %d has no files", modInfoData.ID)
|
return modFileInfo{}, fmt.Errorf("addon %d has no files", modInfoData.ID)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 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")
|
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)
|
fileInfoData, err := getFileInfo(modInfoData.ID, fileID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Reference in New Issue
Block a user