* uinfo.cc (cygheap_user::env_userprofile): Simplify since network

drives are not supported here.
This commit is contained in:
Corinna Vinschen 2012-02-08 17:51:34 +00:00
parent a7a03a3920
commit 7dc730e8ee
2 changed files with 6 additions and 9 deletions

View File

@ -1,3 +1,8 @@
2012-02-08 Corinna Vinschen <corinna@vinschen.de>
* uinfo.cc (cygheap_user::env_userprofile): Simplify since network
drives are not supported here.
2012-02-08 Corinna Vinschen <corinna@vinschen.de> 2012-02-08 Corinna Vinschen <corinna@vinschen.de>
* uinfo.cc (cygheap_user::env_userprofile): Convert native * uinfo.cc (cygheap_user::env_userprofile): Convert native

View File

@ -440,15 +440,7 @@ cygheap_user::env_userprofile (const char *name, size_t namelen)
cfree_and_set (puserprof, almost_null); cfree_and_set (puserprof, almost_null);
if (get_registry_hive_path (get_windows_id (win_id), userprofile_env_buf)) if (get_registry_hive_path (get_windows_id (win_id), userprofile_env_buf))
{ sys_wcstombs_alloc (&puserprof, HEAP_STR, userprofile_env_buf + 4);
PWCHAR up = userprofile_env_buf + 4;
if (!wcsncasecmp (up, L"UNC\\", 4))
{
up += 2;
*up = L'\\';
}
sys_wcstombs_alloc (&puserprof, HEAP_STR, up);
}
return puserprof; return puserprof;
} }