[Style] Remove all links to Path from replacements

This commit is contained in:
Matt Nadareski
2016-10-30 23:22:44 -07:00
parent 13336531d2
commit be53a95195

View File

@@ -412,15 +412,15 @@ namespace SabreTools.Helper.Tools
return ""; return "";
} }
if (s.Contains(Path.AltDirectorySeparatorChar.ToString())) if (s.Contains("/"))
{ {
string[] tempkey = s.Split(Path.AltDirectorySeparatorChar); string[] tempkey = s.Split('/');
return String.Join(Path.AltDirectorySeparatorChar.ToString(), tempkey.Take(tempkey.Length - 1)); return String.Join("/", tempkey.Take(tempkey.Length - 1));
} }
else if (s.Contains(Path.DirectorySeparatorChar.ToString())) else if (s.Contains("\\"))
{ {
string[] tempkey = s.Split(Path.DirectorySeparatorChar); string[] tempkey = s.Split('\\');
return String.Join(Path.DirectorySeparatorChar.ToString(), tempkey.Take(tempkey.Length - 1)); return String.Join("\\", tempkey.Take(tempkey.Length - 1));
} }
return ""; return "";
@@ -438,14 +438,14 @@ namespace SabreTools.Helper.Tools
return ""; return "";
} }
if (s.Contains(Path.AltDirectorySeparatorChar.ToString())) if (s.Contains("/"))
{ {
string[] tempkey = s.Split(Path.AltDirectorySeparatorChar); string[] tempkey = s.Split('/');
return tempkey.Last(); return tempkey.Last();
} }
else if (s.Contains(Path.DirectorySeparatorChar.ToString())) else if (s.Contains("\\"))
{ {
string[] tempkey = s.Split(Path.DirectorySeparatorChar); string[] tempkey = s.Split('\\');
return tempkey.Last(); return tempkey.Last();
} }