Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] Fix cache dir resolving on Windows
@ 2019-06-03 19:37 orgads
  2019-06-04 14:44 ` Eli Zaretskii
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: orgads @ 2019-06-03 19:37 UTC (permalink / raw)
  To: gdb-patches; +Cc: Orgad Shaneh

From: Orgad Shaneh <orgads@gmail.com>

... when not running from MSYS environment, and HOME is not set.
---
 gdb/common/pathstuff.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gdb/common/pathstuff.c b/gdb/common/pathstuff.c
index 2b1669a5b9..edb8a1fcda 100644
--- a/gdb/common/pathstuff.c
+++ b/gdb/common/pathstuff.c
@@ -231,6 +231,10 @@ get_standard_cache_dir ()
 #endif
 
   const char *home = getenv ("HOME");
+#ifdef _WIN32
+  if (home == nullptr)
+      home = getenv ("USERPROFILE");
+#endif
   if (home != NULL)
     {
       /* Make sure the path is absolute and tilde-expanded.  */
-- 
2.22.0.rc0.windows.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2019-06-07 18:10 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-03 19:37 [PATCH] Fix cache dir resolving on Windows orgads
2019-06-04 14:44 ` Eli Zaretskii
2019-06-04 15:06   ` Simon Marchi
2019-06-04 16:17     ` Eli Zaretskii
2019-06-07  6:21 ` orgads
2019-06-07  6:23   ` Orgad Shaneh
2019-06-07  6:27   ` Eli Zaretskii
2019-06-07  6:27 ` orgads
2019-06-07  7:36   ` Eli Zaretskii
2019-06-07  8:01     ` Eli Zaretskii
     [not found]       ` <CAGHpTB+Y+kO=ZiKtTft3yG4mMR+27DYfqJGQWBLvu=VKCgRyLw@mail.gmail.com>
2019-06-07 12:29         ` Eli Zaretskii
2019-06-07 18:10   ` Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox