Commit a33ff001 authored by Diego Pettenò's avatar Diego Pettenò Committed by Alexandre Julliard

Add support for file:/// urls in PathCreateFromUrl.

parent 66af8b5f
...@@ -3244,7 +3244,7 @@ HRESULT WINAPI PathCreateFromUrlA(LPCSTR lpszUrl, LPSTR lpszPath, ...@@ -3244,7 +3244,7 @@ HRESULT WINAPI PathCreateFromUrlA(LPCSTR lpszUrl, LPSTR lpszPath,
HRESULT WINAPI PathCreateFromUrlW(LPCWSTR lpszUrl, LPWSTR lpszPath, HRESULT WINAPI PathCreateFromUrlW(LPCWSTR lpszUrl, LPWSTR lpszPath,
LPDWORD pcchPath, DWORD dwFlags) LPDWORD pcchPath, DWORD dwFlags)
{ {
static const WCHAR stemp[] = { 'f','i','l','e',':','/','/',0 }; static const WCHAR stemp[] = { 'f','i','l','e',':','/','/','/',0 };
LPWSTR pwszPathPart; LPWSTR pwszPathPart;
HRESULT hr; HRESULT hr;
...@@ -3253,8 +3253,13 @@ HRESULT WINAPI PathCreateFromUrlW(LPCWSTR lpszUrl, LPWSTR lpszPath, ...@@ -3253,8 +3253,13 @@ HRESULT WINAPI PathCreateFromUrlW(LPCWSTR lpszUrl, LPWSTR lpszPath,
if (!lpszUrl || !lpszPath || !pcchPath || !*pcchPath) if (!lpszUrl || !lpszPath || !pcchPath || !*pcchPath)
return E_INVALIDARG; return E_INVALIDARG;
/* Path of the form file:///... */
if (!strncmpW(lpszUrl, stemp, 8))
{
lpszUrl += 8;
}
/* Path of the form file://... */ /* Path of the form file://... */
if (!strncmpW(lpszUrl, stemp, 7)) else if (!strncmpW(lpszUrl, stemp, 7))
{ {
lpszUrl += 7; lpszUrl += 7;
} }
......
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