From 7dc730e8ee312fde126d45466d883a217c595ceb Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 8 Feb 2012 17:51:34 +0000 Subject: [PATCH] * uinfo.cc (cygheap_user::env_userprofile): Simplify since network drives are not supported here. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/uinfo.cc | 10 +--------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 54510dd2a..58c6265c6 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2012-02-08 Corinna Vinschen + + * uinfo.cc (cygheap_user::env_userprofile): Simplify since network + drives are not supported here. + 2012-02-08 Corinna Vinschen * uinfo.cc (cygheap_user::env_userprofile): Convert native diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc index eddfcec2b..c3850ef13 100644 --- a/winsup/cygwin/uinfo.cc +++ b/winsup/cygwin/uinfo.cc @@ -440,15 +440,7 @@ cygheap_user::env_userprofile (const char *name, size_t namelen) cfree_and_set (puserprof, almost_null); if (get_registry_hive_path (get_windows_id (win_id), userprofile_env_buf)) - { - PWCHAR up = userprofile_env_buf + 4; - if (!wcsncasecmp (up, L"UNC\\", 4)) - { - up += 2; - *up = L'\\'; - } - sys_wcstombs_alloc (&puserprof, HEAP_STR, up); - } + sys_wcstombs_alloc (&puserprof, HEAP_STR, userprofile_env_buf + 4); return puserprof; }