Commit b9a3f8fa authored by Alexandre Julliard's avatar Alexandre Julliard

RtlGetFullPathName_U should remove the trailing dot on directory

names.
parent 0ea0f5ff
...@@ -504,7 +504,12 @@ static inline void collapse_path( WCHAR *path, UINT mark ) ...@@ -504,7 +504,12 @@ static inline void collapse_path( WCHAR *path, UINT mark )
} }
/* skip to the next component */ /* skip to the next component */
while (*p && *p != '\\') p++; 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) */ /* remove trailing spaces and dots (yes, Windows really does that, don't ask) */
......
...@@ -239,6 +239,9 @@ static void test_RtlGetFullPathName_U() ...@@ -239,6 +239,9 @@ static void test_RtlGetFullPathName_U()
{ "c:/test/.. ", "c:\\test\\", NULL}, { "c:/test/.. ", "c:\\test\\", NULL},
{ "c:/TEST", "c:\\test", "test"}, { "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"},
{ "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"},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment