[v2] kernel32: properly deal with double path delimiters in GetShortPathName.
Matteo Bruni
matteo.mystral at gmail.com
Wed Aug 10 17:59:03 CDT 2016
2016-08-10 15:27 GMT+02:00 Peter Beutner <p.beutner at gmx.net>:
> v2: ignore previous attempt, this is a better fix i think
>
> Remove the extra if clause that deals with paths starting with ".\\". The
> code a few lines below that handles "." or ".." as part of the path
> already handles that case.
> That way the code handling path delimiters will properly work for
> paths starting with ".\\\\".
>
> Fixes https://bugs.winehq.org/show_bug.cgi?id=41002
>
> Signed-off-by: Peter Beutner <p.beutner at gmx.net>
> ---
> dlls/kernel32/path.c | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/dlls/kernel32/path.c b/dlls/kernel32/path.c
> index 620401d..3eff35e 100644
> --- a/dlls/kernel32/path.c
> +++ b/dlls/kernel32/path.c
> @@ -510,12 +510,6 @@ DWORD WINAPI GetShortPathNameW( LPCWSTR longpath, LPWSTR shortpath, DWORD shortl
> }
>
> p = longpath + lp;
> - if (lp == 0 && p[0] == '.' && (p[1] == '/' || p[1] == '\\'))
> - {
> - tmpshortpath[sp++] = *p++;
> - tmpshortpath[sp++] = *p++;
> - lp += 2;
> - }
> for (; *p && *p != '/' && *p != '\\'; p++);
> tmplen = p - (longpath + lp);
> lstrcpynW(tmpshortpath + sp, longpath + lp, tmplen + 1);
> --
> 2.7.3
In case you haven't noticed, you patch was not accepted because it
needs tests, as Bruno mentioned in the bug report.
You can check the status of your patches on http://source.winehq.org/patches/.
BTW, thank you for your work!
More information about the wine-devel
mailing list