Skip to content

Commit

Permalink
Merge pull request #1174 from meziantou/missing-stringcomparison
Browse files Browse the repository at this point in the history
  • Loading branch information
patriksvensson authored Feb 22, 2023
2 parents 04610cf + baa8220 commit 819b948
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Spectre.Console/Widgets/TextPath.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ public TextPath(string path)
_parts = path.Split(new char[] { '/' }, StringSplitOptions.RemoveEmptyEntries);

// Rooted Unix path?
if (path.StartsWith("/"))
if (path.StartsWith("/", StringComparison.Ordinal))
{
_rooted = true;
_parts = new[] { "/" }.Concat(_parts).ToArray();
}
else if (_parts.Length > 0 && _parts[0].EndsWith(":"))
else if (_parts.Length > 0 && _parts[0].EndsWith(":", StringComparison.Ordinal))
{
// Rooted Windows path
_rooted = true;
Expand Down

0 comments on commit 819b948

Please sign in to comment.