mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-06-20 05:48:14 +08:00
Use StringComparison.Ordinal instead of culture-sensitive comparisons
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user