Re: [PATCH 1/2] shlwapi: Remove dot segments for URLs starting with /
Hi Daniel, On 24.11.2016 00:44, Daniel Lehman wrote:
diff --git a/dlls/shlwapi/url.c b/dlls/shlwapi/url.c index 879a734..5de9076 100644 --- a/dlls/shlwapi/url.c +++ b/dlls/shlwapi/url.c @@ -372,6 +372,9 @@ HRESULT WINAPI UrlCanonicalizeW(LPCWSTR pszUrl, LPWSTR pszCanonicalized, dwFlags |= URL_ESCAPE_UNSAFE; state = 5; is_file_url = TRUE; + } else if(url[0] == '/') { + state = 2;
Wouldn't state 5 be more appropriate?
+ is_file_url = TRUE;
It would be interesting to have tests using URL_WININET_COMPATIBILITY and URL_FILE_USE_PATHURL flags. is_file_url usually affects slashes conversion in such cases, but you set it too late to take such effect. It may be right, but tests would be nice. Thanks, Jacek
participants (1)
-
Jacek Caban