diff options
author | Anirudh Agnihotry <anirudhagnihotry098@gmail.com> | 2018-03-14 14:33:35 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-14 14:33:35 -0700 |
commit | 76be5e3928cbfa01e96086e532a6476f1acac293 (patch) | |
tree | 8b648c5f83d4363ad205f745c059b946c845aa84 | |
parent | c7fa7836e63c829a91bb796864bdebaa803e1253 (diff) | |
download | coreclr-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.cs | 2 |
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 */]; |