diff options
author | Jan Kotas <jkotas@microsoft.com> | 2018-09-12 18:12:53 +0300 |
---|---|---|
committer | Jan Kotas <jkotas@microsoft.com> | 2018-09-12 21:06:06 +0300 |
commit | e6ab0107580f2e32d022dbbe2201e2ad6dfdb1d2 (patch) | |
tree | de395742afc77048bb101c6578e2486f621f65d1 | |
parent | 98962048598d3743b67b2b4475c908241fef550b (diff) |
Revert changes that are causing buildbreaks of OOB packages
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
-rw-r--r-- | src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/TraceLogging/Statics.cs | 2 | ||||
-rw-r--r-- | src/System.Private.CoreLib/shared/System/IO/PathHelper.Windows.cs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/TraceLogging/Statics.cs b/src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/TraceLogging/Statics.cs index 3dc788350..0c2167213 100644 --- a/src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/TraceLogging/Statics.cs +++ b/src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/TraceLogging/Statics.cs @@ -174,7 +174,7 @@ namespace System.Diagnostics.Tracing public static void CheckName(string name) { - if (name != null && name.Contains('\0')) + if (name != null && 0 <= name.IndexOf('\0')) { throw new ArgumentOutOfRangeException(nameof(name)); } diff --git a/src/System.Private.CoreLib/shared/System/IO/PathHelper.Windows.cs b/src/System.Private.CoreLib/shared/System/IO/PathHelper.Windows.cs index f9a649590..bada2f5cd 100644 --- a/src/System.Private.CoreLib/shared/System/IO/PathHelper.Windows.cs +++ b/src/System.Private.CoreLib/shared/System/IO/PathHelper.Windows.cs @@ -33,7 +33,7 @@ namespace System.IO // If we have the exact same string we were passed in, don't allocate another string. // TryExpandShortName does this input identity check. - string result = builder.AsSpan().Contains('~') + string result = builder.AsSpan().IndexOf('~') >= 0 ? TryExpandShortFileName(ref builder, originalPath: path) : builder.AsSpan().Equals(path.AsSpan(), StringComparison.Ordinal) ? path : builder.ToString(); @@ -56,7 +56,7 @@ namespace System.IO // Get the full path GetFullPathName(path.AsSpan(terminate: true), ref builder); - string result = builder.AsSpan().Contains('~') + string result = builder.AsSpan().IndexOf('~') >= 0 ? TryExpandShortFileName(ref builder, originalPath: null) : builder.ToString(); |