Blame SOURCES/sdk-23080-userlocal-workload.patch

2547b6
From 6e57b7c1d7f9b5ce82eef106d465af81382794b3 Mon Sep 17 00:00:00 2001
2547b6
From: Tom Deseyn <tom.deseyn@gmail.com>
2547b6
Date: Wed, 15 Dec 2021 15:06:51 +0100
2547b6
Subject: [PATCH] userlocal detection: also force last digits to zero for
2547b6
 non-preview versions.
2547b6
2547b6
---
2547b6
 src/Common/WorkloadFileBasedInstall.cs | 2 +-
2547b6
 1 file changed, 1 insertion(+), 1 deletion(-)
2547b6
2547b6
diff --git a/src/Common/WorkloadFileBasedInstall.cs b/src/Common/WorkloadFileBasedInstall.cs
2547b6
index f0d82c1fa9..0b27b0939c 100644
2547b6
--- a/src/Common/WorkloadFileBasedInstall.cs
2547b6
+++ b/src/Common/WorkloadFileBasedInstall.cs
2547b6
@@ -21,7 +21,7 @@ internal static void SetUserLocal(string dotnetDir, string sdkFeatureBand)
2547b6
 
2547b6
         private static string GetUserInstallFilePath(string dotnetDir, string sdkFeatureBand)
2547b6
         {
2547b6
-            if (sdkFeatureBand.Contains("-"))
2547b6
+            if (sdkFeatureBand.Contains("-") || !sdkFeatureBand.EndsWith("00", StringComparison.Ordinal))
2547b6
             {
2547b6
                 // The user passed in the sdk version. Derive the feature band version.
2547b6
                 if (!Version.TryParse(sdkFeatureBand.Split('-')[0], out var sdkVersionParsed))