From d3b52209a4cc3191634f5d67c65fea64c2f6f1fa Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Sat, 26 Feb 2011 22:23:03 +0000 Subject: [PATCH] [URLCACHE] Do not initialize the URL-Cache for a system process. Patch will be submitted to WINE. See issue #5372 for more details. svn path=/trunk/; revision=50916 --- reactos/dll/win32/wininet/urlcache.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/reactos/dll/win32/wininet/urlcache.c b/reactos/dll/win32/wininet/urlcache.c index 2129f42e734..63a160d4a29 100644 --- a/reactos/dll/win32/wininet/urlcache.c +++ b/reactos/dll/win32/wininet/urlcache.c @@ -527,6 +527,7 @@ void URLCacheContainers_CreateDefaults(void) static const WCHAR HistoryPrefix[] = {'V','i','s','i','t','e','d',':',0}; static const WCHAR CookieSuffix[] = {0}; static const WCHAR CookiePrefix[] = {'C','o','o','k','i','e',':',0}; + static const WCHAR UserProfile[] = {'U','S','E','R','P','R','O','F','I','L','E',0}; static const struct { int nFolder; /* CSIDL_* constant */ @@ -540,6 +541,12 @@ void URLCacheContainers_CreateDefaults(void) }; DWORD i; + if (GetEnvironmentVariableW(UserProfile, NULL, 0) == 0 && GetLastError() == ERROR_ENVVAR_NOT_FOUND) + { + TRACE("Environment variable 'USERPROFILE' does not exist!\n"); + return; + } + for (i = 0; i < sizeof(DefaultContainerData) / sizeof(DefaultContainerData[0]); i++) { WCHAR wszCachePath[MAX_PATH];