Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnirudh Agnihotry <anirudhagnihotry098@gmail.com>2018-02-28 02:56:23 +0300
committerJan Kotas <jkotas@microsoft.com>2018-02-28 05:50:50 +0300
commit76899b2aaef6e30297e06ba7043995c1b2336c42 (patch)
tree479ea149380877629e5a33fbcef7caa0be3a581c
parent03379df40d14d4f9074c65fac39a05b0b3a8788c (diff)
Bug in GetFullPath(basePath, Path) (dotnet/coreclr#16598)
* GetFullPath and GetRootLength Corrected * Removed getpathroot * using span * "\\" changed to @"\" Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
-rw-r--r--src/System.Private.CoreLib/shared/System/IO/Path.Windows.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/System.Private.CoreLib/shared/System/IO/Path.Windows.cs b/src/System.Private.CoreLib/shared/System/IO/Path.Windows.cs
index 6a8745d12..c92211f73 100644
--- a/src/System.Private.CoreLib/shared/System/IO/Path.Windows.cs
+++ b/src/System.Private.CoreLib/shared/System/IO/Path.Windows.cs
@@ -98,8 +98,8 @@ namespace System.IO
{
// No matching root, root to specified drive
// "D:Foo" and "C:\Bar" => "D:Foo"
- // "D:\Foo" and "\\?\C:\Bar" => "\\?\D:\Foo"
- combinedPath = path.Insert(2, "\\");
+ // "D:Foo" and "\\?\C:\Bar" => "\\?\D:\Foo"
+ combinedPath = PathInternal.IsDevice(basePath) ? CombineNoChecksInternal(basePath.AsSpan().Slice(0, 4), path.AsSpan().Slice(0, 2), @"\", path.AsSpan().Slice(2)) : path.Insert(2, "\\");
}
}
else