RtlGetFullPathName_U should remove the trailing dot on directory
names.
This commit is contained in:
parent
0ea0f5fffd
commit
b9a3f8fabf
|
@ -504,7 +504,12 @@ static inline void collapse_path( WCHAR *path, UINT mark )
|
|||
}
|
||||
/* skip to the next component */
|
||||
while (*p && *p != '\\') p++;
|
||||
if (*p == '\\') p++;
|
||||
if (*p == '\\')
|
||||
{
|
||||
/* remove last dot in previous dir name */
|
||||
if (p > path + mark && p[-1] == '.') memmove( p-1, p, (strlenW(p) + 1) * sizeof(WCHAR) );
|
||||
else p++;
|
||||
}
|
||||
}
|
||||
|
||||
/* remove trailing spaces and dots (yes, Windows really does that, don't ask) */
|
||||
|
|
|
@ -239,6 +239,9 @@ static void test_RtlGetFullPathName_U()
|
|||
{ "c:/test/.. ", "c:\\test\\", NULL},
|
||||
{ "c:/TEST", "c:\\test", "test"},
|
||||
{ "c:/test/file", "c:\\test\\file", "file"},
|
||||
{ "c:/test./file", "c:\\test\\file", "file"},
|
||||
{ "c:/test../file", "c:\\test.\\file", "file"},
|
||||
{ "c:/test.. /file", "c:\\test.. \\file","file"},
|
||||
{ "c:/test/././file", "c:\\test\\file", "file"},
|
||||
{ "c:/test\\.\\.\\file", "c:\\test\\file", "file"},
|
||||
{ "c:/test/\\.\\.\\file", "c:\\test\\file", "file"},
|
||||
|
|
Loading…
Reference in New Issue