summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 */];