From 76be5e3928cbfa01e96086e532a6476f1acac293 Mon Sep 17 00:00:00 2001 From: Anirudh Agnihotry Date: Wed, 14 Mar 2018 14:33:35 -0700 Subject: [PATCH] DIfferent Directory Separator for linux (#16936) --- src/mscorlib/shared/System/IO/PathInternal.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mscorlib/shared/System/IO/PathInternal.cs b/src/mscorlib/shared/System/IO/PathInternal.cs index c5cce00..00a7092 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 initialBuffer = stackalloc char[260 /* PathInternal.MaxShortPath */]; -- 2.7.4