mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-04-14 16:02:50 +08:00
Merge pull request #1174 from meziantou/missing-stringcomparison
This commit is contained in:
commit
819b948e78
@ -52,12 +52,12 @@ public sealed class TextPath : IRenderable, IHasJustification
|
||||
_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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user