Skip to content
This repository was archived by the owner on May 17, 2024. It is now read-only.

Commit f08719b

Browse files
ujjwalchadhaJoeRobich
authored andcommitted
Address PR feedback
1 parent b759582 commit f08719b

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

src/MSBuild.Abstractions/BaselineProject.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,7 @@ private static string GetCurrentTFM(ImmutableArray<string> globalProperties, Unc
6565
$"{MSBuildFacts.TargetFrameworkNodeName} is not set in {nameof(project.FirstConfiguredProject)}");
6666
}
6767

68-
// MSBuildHelpers.IsNotNetFramework is pretty much never gonna happen...
69-
// but MSBuildHelpers.IsWindows(rawTFM) can happen when coverting a UWP
68+
// MSBuildHelpers.IsWindows(rawTFM) can happen when coverting a UWP
7069
return MSBuildHelpers.IsNotNetFramework(rawTFM) && !MSBuildHelpers.IsWindows(rawTFM) ? StripDecimals(rawTFM) : rawTFM;
7170

7271
static string StripDecimals(string tfm)

src/MSBuild.Abstractions/MSBuildHelpers.cs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -406,19 +406,12 @@ public static bool ArePropertyGroupElementsIdentical(ProjectPropertyGroupElement
406406
/// <returns>true if string is successfuly unquoted</returns>
407407
private static bool UnquoteString(ref string s)
408408
{
409-
if (s.Length < 2 || s[0] != '\'' || s[^1] != '\'')
409+
if (s.Length < 2 || s[0] != '\'' || s[^1] != '\'' || s[1..^1].Contains('\''))
410410
{
411411
return false;
412412
}
413413

414414
s = s[1..^1];
415-
416-
// Make sure there wasn't another string in there
417-
if (s.Contains('\''))
418-
{
419-
return false;
420-
}
421-
422415
return true;
423416
}
424417

0 commit comments

Comments
 (0)