From a33ff00133a1b9d5d224902f3c43e7b981be2b50 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Diego=20Petten=C3=B2?= Date: Fri, 10 Sep 2004 21:12:11 +0000 Subject: [PATCH] Add support for file:/// urls in PathCreateFromUrl. --- dlls/shlwapi/path.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/dlls/shlwapi/path.c b/dlls/shlwapi/path.c index 1aa0fec6d89..d8f9c779d1e 100644 --- a/dlls/shlwapi/path.c +++ b/dlls/shlwapi/path.c @@ -3244,7 +3244,7 @@ HRESULT WINAPI PathCreateFromUrlA(LPCSTR lpszUrl, LPSTR lpszPath, HRESULT WINAPI PathCreateFromUrlW(LPCWSTR lpszUrl, LPWSTR lpszPath, LPDWORD pcchPath, DWORD dwFlags) { - static const WCHAR stemp[] = { 'f','i','l','e',':','/','/',0 }; + static const WCHAR stemp[] = { 'f','i','l','e',':','/','/','/',0 }; LPWSTR pwszPathPart; HRESULT hr; @@ -3253,8 +3253,13 @@ HRESULT WINAPI PathCreateFromUrlW(LPCWSTR lpszUrl, LPWSTR lpszPath, if (!lpszUrl || !lpszPath || !pcchPath || !*pcchPath) return E_INVALIDARG; + /* Path of the form file:///... */ + if (!strncmpW(lpszUrl, stemp, 8)) + { + lpszUrl += 8; + } /* Path of the form file://... */ - if (!strncmpW(lpszUrl, stemp, 7)) + else if (!strncmpW(lpszUrl, stemp, 7)) { lpszUrl += 7; } -- 2.11.4.GIT