summaryrefslogtreecommitdiff
path: root/src/mscorlib/shared/System/IO/PathInternal.Windows.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/mscorlib/shared/System/IO/PathInternal.Windows.cs')
-rw-r--r--src/mscorlib/shared/System/IO/PathInternal.Windows.cs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mscorlib/shared/System/IO/PathInternal.Windows.cs b/src/mscorlib/shared/System/IO/PathInternal.Windows.cs
index ee0dd54383..ee2d29c032 100644
--- a/src/mscorlib/shared/System/IO/PathInternal.Windows.cs
+++ b/src/mscorlib/shared/System/IO/PathInternal.Windows.cs
@@ -438,5 +438,10 @@ namespace System.IO
{
return IsDirectorySeparator(ch) || VolumeSeparatorChar == ch;
}
+
+ internal static string TrimEndingDirectorySeparator(string path) =>
+ EndsInDirectorySeparator(path) ?
+ path.Substring(0, path.Length - 1) :
+ path;
}
}