summaryrefslogtreecommitdiff
path: root/src/System.Private.CoreLib/shared/System
diff options
context:
space:
mode:
authorStephen Toub <stoub@microsoft.com>2019-01-03 21:26:46 -0500
committerJan Kotas <jkotas@microsoft.com>2019-01-04 05:09:24 -1000
commitc90d7ec04e9167cb48d0eb4e49f6b5b6828b2d3a (patch)
tree84112a24532c1dea80745b62e137c5dd6b4e43b5 /src/System.Private.CoreLib/shared/System
parent606e36b862a1fa74c04abdd38b8b19752bd29280 (diff)
downloadcoreclr-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.cs6
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>