From: Christoph von Wittich Date: Sat, 24 Sep 2016 12:19:35 +0000 (+0000) Subject: [CRYPTNET] don't try to prepend a drive letter when there is one already X-Git-Tag: ReactOS-0.4.3~262 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=6476277b5cc8db8939102e6bdc922400e10a8005 [CRYPTNET] don't try to prepend a drive letter when there is one already svn path=/trunk/; revision=72793 --- diff --git a/reactos/dll/win32/cryptnet/cryptnet_main.c b/reactos/dll/win32/cryptnet/cryptnet_main.c index b213c081d63..e421625c589 100644 --- a/reactos/dll/win32/cryptnet/cryptnet_main.c +++ b/reactos/dll/win32/cryptnet/cryptnet_main.c @@ -1025,8 +1025,11 @@ static BOOL WINAPI File_RetrieveEncodedObjectW(LPCWSTR pszURL, components.dwUrlPathLength + 1); hFile = CreateFileW(path, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); -#ifndef __REACTOS__ - if (hFile == INVALID_HANDLE_VALUE) +#ifdef __REACTOS__ + if ((hFile == INVALID_HANDLE_VALUE) && (lstrlenW(components.lpszUrlPath) > 1) && (components.lpszUrlPath[1] != ':')) +#else + if ((hFile == INVALID_HANDLE_VALUE) +#endif { /* Try again on the current drive */ GetCurrentDirectoryW(components.dwUrlPathLength, path); @@ -1050,7 +1053,6 @@ static BOOL WINAPI File_RetrieveEncodedObjectW(LPCWSTR pszURL, } } } -#endif if (hFile != INVALID_HANDLE_VALUE) { if ((ret = CRYPT_GetObjectFromFile(hFile, pObject)))