From c7cb7ebb8112f848c3f66f7ae98c9ec0139935aa Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sun, 24 Feb 2019 16:29:50 -0500 Subject: fix smapi.io linking to an archived download in rare cases --- docs/release-notes.md | 1 + src/SMAPI.Web/Controllers/IndexController.cs | 3 +++ 2 files changed, 4 insertions(+) diff --git a/docs/release-notes.md b/docs/release-notes.md index 72477df1..dce1e715 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -11,6 +11,7 @@ Currently in beta for Stardew Valley 1.3.35-beta only. **Not compatible with non * For the web UI: * The log parser now displays available updates in a section at the top. * Mod compatibility page now crosses out mod links if they're outdated to prevent confusion. + * Fixed smapi.io linking to an archived download in rare cases. ## 2.10.2 Released 09 January 2019 for Stardew Valley 1.3.32–33. diff --git a/src/SMAPI.Web/Controllers/IndexController.cs b/src/SMAPI.Web/Controllers/IndexController.cs index 7b3b3e80..ea1a52b2 100644 --- a/src/SMAPI.Web/Controllers/IndexController.cs +++ b/src/SMAPI.Web/Controllers/IndexController.cs @@ -141,6 +141,9 @@ namespace StardewModdingAPI.Web.Controllers foreach (GitAsset asset in release.Assets) { + if (asset.FileName.StartsWith("Z_OLD")) + continue; + Match match = Regex.Match(asset.FileName, @"SMAPI-(?[\d\.]+(?:-.+)?)-installer(?-for-developers)?.zip"); if (!match.Success || !SemanticVersion.TryParse(match.Groups["version"].Value, out ISemanticVersion version)) continue; -- cgit