summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/uinfo.cc10
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,5 +1,10 @@
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>
+
* uinfo.cc (cygheap_user::env_userprofile): Convert native
userprofile path returned from get_registry_hive_path to Win32 path.
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;
}