From ca193ad4a7754e6ce93c1fa2f499ac7ba98346e1 Mon Sep 17 00:00:00 2001 From: Alex Ionescu Date: Sun, 4 Dec 2011 17:25:15 +0000 Subject: [PATCH] [RTL]: Clarify a comment. svn path=/trunk/; revision=54588 --- reactos/lib/rtl/path.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/reactos/lib/rtl/path.c b/reactos/lib/rtl/path.c index 4296c4c6f1a..2f34d8235c4 100644 --- a/reactos/lib/rtl/path.c +++ b/reactos/lib/rtl/path.c @@ -890,7 +890,14 @@ RtlGetCurrentDirectory_U(IN ULONG MaximumLength, Length = CurDir->DosPath.Length / sizeof(WCHAR); ASSERT((CurDirName != NULL) && (Length > 0)); - /* Check for x:\ vs x:\path\foo (note the trailing slash) */ + /* + * DosPath.Buffer should always have a trailing slash. There is an assert + * below which checks for this. + * + * This function either returns x:\ for a root (keeping the original buffer) + * or it returns x:\path\foo for a directory (replacing the trailing slash + * with a NULL. + */ Bytes = Length * sizeof(WCHAR); if ((Length <= 1) || (CurDirName[Length - 2] == L':')) {