summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnirudh Agnihotry <anirudhagnihotry098@gmail.com>2018-03-14 14:33:35 -0700
committerGitHub <noreply@github.com>2018-03-14 14:33:35 -0700
commit76be5e3928cbfa01e96086e532a6476f1acac293 (patch)
tree8b648c5f83d4363ad205f745c059b946c845aa84
parentc7fa7836e63c829a91bb796864bdebaa803e1253 (diff)
downloadcoreclr-76be5e3928cbfa01e96086e532a6476f1acac293.tar.gz
coreclr-76be5e3928cbfa01e96086e532a6476f1acac293.tar.bz2
coreclr-76be5e3928cbfa01e96086e532a6476f1acac293.zip
DIfferent Directory Separator for linux (#16936)
-rw-r--r--src/mscorlib/shared/System/IO/PathInternal.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mscorlib/shared/System/IO/PathInternal.cs b/src/mscorlib/shared/System/IO/PathInternal.cs
index c5cce00b8f..00a709213f 100644
--- a/src/mscorlib/shared/System/IO/PathInternal.cs
+++ b/src/mscorlib/shared/System/IO/PathInternal.cs
@@ -123,7 +123,7 @@ namespace System.IO
// We treat "\.." , "\." and "\\" as a relative segment. We want to collapse the first separator past the root presuming
// the root actually ends in a separator. Otherwise the first segment for RemoveRelativeSegments
// in cases like "\\?\C:\.\" and "\\?\C:\..\", the first segment after the root will be ".\" and "..\" which is not considered as a relative segment and hence not be removed.
- if (path[skip - 1] == '\\')
+ if (PathInternal.IsDirectorySeparator(path[skip - 1]))
skip--;
Span<char> initialBuffer = stackalloc char[260 /* PathInternal.MaxShortPath */];