mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 12:45:00 +00:00
enhance: force using StringComparison.Ordinal
This commit is contained in:
parent
cd2ecb109a
commit
f6eb1281b5
12 changed files with 23 additions and 19 deletions
|
@ -1,4 +1,6 @@
|
|||
namespace SourceGit.Models {
|
||||
using System;
|
||||
|
||||
namespace SourceGit.Models {
|
||||
public enum ChangeViewMode {
|
||||
List,
|
||||
Grid,
|
||||
|
@ -36,12 +38,12 @@
|
|||
WorkTree = workTree;
|
||||
|
||||
if (index == ChangeState.Renamed || workTree == ChangeState.Renamed) {
|
||||
var idx = Path.IndexOf('\t');
|
||||
var idx = Path.IndexOf('\t', StringComparison.Ordinal);
|
||||
if (idx >= 0) {
|
||||
OriginalPath = Path.Substring(0, idx);
|
||||
Path = Path.Substring(idx + 1);
|
||||
} else {
|
||||
idx = Path.IndexOf(" -> ");
|
||||
idx = Path.IndexOf(" -> ", StringComparison.Ordinal);
|
||||
if (idx > 0) {
|
||||
OriginalPath = Path.Substring(0, idx);
|
||||
Path = Path.Substring(idx + 4);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue