Skip to content

Commit

Permalink
改进扫描rc版dotNet
Browse files Browse the repository at this point in the history
  • Loading branch information
nnhy committed Oct 18, 2024
1 parent 429ac0f commit bdcb0c6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion EasyWeb/Services/EntryService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ private FileEntry MatchLink(Int32 storageId, Int32 parentId, String[] matchs)
public void FixVersionAndTag(FileEntry entry)
{
var name = entry.Name;
if (name.IsNullOrEmpty() || !Version.TryParse(name, out _) && !name.Contains("net") && !name.Contains("runtime") && !name.Contains("-preview")) return;
if (name.IsNullOrEmpty() || !Version.TryParse(name, out _) && !name.Contains("net") && !name.Contains("runtime") && !name.Contains("-rc") && !name.Contains("-preview")) return;

name = name.TrimEnd(".tar.gz", ".zip", ".exe", ".pkg");

Expand Down Expand Up @@ -365,6 +365,10 @@ String GetVersion(String name)
p = name.LastIndexOf("-preview");
if (p > 0) return name.Replace("-preview", null);

// 9.0.0-rc.2 为区分于预览版,尾部版本号补0
p = name.LastIndexOf("-rc");
if (p > 0) return name.Replace("-rc", null) + "0";

return null;
}

Expand Down

0 comments on commit bdcb0c6

Please sign in to comment.