Allow "updating" CurseForge files to older versions

This commit is contained in:
comp500 2023-04-15 02:23:52 +01:00
parent e966eaffc0
commit 7de26ec5c3

View File

@ -419,8 +419,8 @@ func (u cfUpdater) CheckUpdate(mods []core.Mod, pack core.Pack) ([]core.UpdateCh
project := projectRaw.(cfUpdateData) project := projectRaw.(cfUpdateData)
fileID, fileInfoData, fileName := findLatestFile(modInfos[i], mcVersions, packLoaders) fileID, fileInfoData, fileName := findLatestFile(modInfos[i], mcVersions, packLoaders)
if fileID > project.FileID && fileID != 0 { if fileID != project.FileID && fileID != 0 {
// Update available! // Update (or downgrade, if changing to an older version) available!
results[i] = core.UpdateCheck{ results[i] = core.UpdateCheck{
UpdateAvailable: true, UpdateAvailable: true,
UpdateString: v.FileName + " -> " + fileName, UpdateString: v.FileName + " -> " + fileName,