diff options
author | Stephen Toub <stoub@microsoft.com> | 2019-01-03 21:26:46 -0500 |
---|---|---|
committer | Jan Kotas <jkotas@microsoft.com> | 2019-01-04 05:09:24 -1000 |
commit | c90d7ec04e9167cb48d0eb4e49f6b5b6828b2d3a (patch) | |
tree | 84112a24532c1dea80745b62e137c5dd6b4e43b5 /src/System.Private.CoreLib/shared/System | |
parent | 606e36b862a1fa74c04abdd38b8b19752bd29280 (diff) | |
download | coreclr-c90d7ec04e9167cb48d0eb4e49f6b5b6828b2d3a.tar.gz coreclr-c90d7ec04e9167cb48d0eb4e49f6b5b6828b2d3a.tar.bz2 coreclr-c90d7ec04e9167cb48d0eb4e49f6b5b6828b2d3a.zip |
Add StringExtensions.Concat to fix Microsoft.IO.Redist assembly
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Diffstat (limited to 'src/System.Private.CoreLib/shared/System')
-rw-r--r-- | src/System.Private.CoreLib/shared/System/IO/Path.cs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/System.Private.CoreLib/shared/System/IO/Path.cs b/src/System.Private.CoreLib/shared/System/IO/Path.cs index 3c9fc3ed24..23da520db2 100644 --- a/src/System.Private.CoreLib/shared/System/IO/Path.cs +++ b/src/System.Private.CoreLib/shared/System/IO/Path.cs @@ -76,9 +76,15 @@ namespace System.IO } ReadOnlySpan<char> subpath = path.AsSpan(0, subLength); +#if MS_IO_REDIST + return extension.Length != 0 && extension[0] == '.' ? + StringExtensions.Concat(subpath, extension.AsSpan()) : + StringExtensions.Concat(subpath, ".".AsSpan(), extension.AsSpan()); +#else return extension.StartsWith('.') ? string.Concat(subpath, extension) : string.Concat(subpath, ".", extension); +#endif } /// <summary> |