Index: include/ndk/rtlfuncs.h
===================================================================
--- include/ndk/rtlfuncs.h	(revision 60313)
+++ include/ndk/rtlfuncs.h	(working copy)
@@ -2726,6 +2726,14 @@
 );
 
 NTSYSAPI
+NTSTATUS
+NTAPI
+RtlGetLengthWithoutTrailingPathSeperators(
+    _In_ ULONG Reserved,
+    _In_ PCUNICODE_STRING PathString,
+    _Out_ PULONG Length);
+
+NTSYSAPI
 ULONG
 NTAPI
 RtlGetLongestNtPathLength(
Index: lib/rtl/path.c
===================================================================
--- lib/rtl/path.c	(revision 60313)
+++ lib/rtl/path.c	(working copy)
@@ -1254,6 +1254,45 @@
 /*
  * @implemented
  */
+NTSTATUS
+NTAPI
+RtlGetLengthWithoutTrailingPathSeperators(IN ULONG Reserved, IN PCUNICODE_STRING PathString, OUT PULONG Length)
+{
+    ULONG Index;
+    PWCHAR Path;
+    ULONG Chars;
+
+    if (!Length)
+        return STATUS_INVALID_PARAMETER;
+
+    *Length = 0;
+
+    if (!PathString || Reserved)
+        return STATUS_INVALID_PARAMETER;
+        
+    Path = PathString->Buffer;
+    Chars = PathString->Length / sizeof(WCHAR);
+
+    if (!Path)
+        return STATUS_INVALID_PARAMETER;
+
+    for (Index = Chars;
+         Index > 0;
+         Index--)
+    {
+        if (!IS_PATH_SEPARATOR(Path[Index-1]))
+        {
+            *Length = Index;
+            return STATUS_SUCCESS;
+        }
+    }
+
+    return STATUS_SUCCESS;
+}
+
+/*
+ * @implemented
+ */
 RTL_PATH_TYPE
 NTAPI
 RtlDetermineDosPathNameType_U(IN PCWSTR Path)
