tst: winfsp-tests: rename_backslash_test

This commit is contained in:
Bill Zissimopoulos
2020-10-01 11:46:55 -07:00
parent 5045403d85
commit 32a5b2bc64
2 changed files with 72 additions and 1 deletions

View File

@ -1589,7 +1589,7 @@ retry:
Suffix.Length = (USHORT)Info->FileNameLength;
Suffix.Buffer = Info->FileName;
/* remove any trailing backslash */
/* remove any trailing backslash; NTFS allows it for both directories AND files! */
if (sizeof(WCHAR) * 2/* not empty or root */ <= Suffix.Length &&
L'\\' == Suffix.Buffer[Suffix.Length / sizeof(WCHAR) - 1])
Suffix.Length -= sizeof(WCHAR);