[ros-diffs] [ekohl] 50916: [URLCACHE] Do not initialize the URL-Cache for a system process. Patch will be submitted to WINE. See issue #5372 for more details.

ekohl at svn.reactos.org ekohl at svn.reactos.org
Sat Feb 26 22:23:04 UTC 2011


Author: ekohl
Date: Sat Feb 26 22:23:03 2011
New Revision: 50916

URL: http://svn.reactos.org/svn/reactos?rev=50916&view=rev
Log:
[URLCACHE]
Do not initialize the URL-Cache for a system process.
Patch will be submitted to WINE.
See issue #5372 for more details.

Modified:
    trunk/reactos/dll/win32/wininet/urlcache.c

Modified: trunk/reactos/dll/win32/wininet/urlcache.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/urlcache.c?rev=50916&r1=50915&r2=50916&view=diff
==============================================================================
--- trunk/reactos/dll/win32/wininet/urlcache.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/wininet/urlcache.c [iso-8859-1] Sat Feb 26 22:23:03 2011
@@ -527,6 +527,7 @@
     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 */
@@ -539,6 +540,12 @@
         { CSIDL_COOKIES, CookieSuffix, CookiePrefix },
     };
     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++)
     {




More information about the Ros-diffs mailing list