summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-09-26 21:42:02 +0200
committerCarl Hetherington <cth@carlh.net>2021-09-26 21:51:04 +0200
commita3d4dfb4357a265d4c3a4bfafe7d17a8ecc72f66 (patch)
tree3c854df3818b6a7f8a14f12f84f3d02e5a1a6196
parent753b75171d1eb3f9e4fc7c2d12fd5b8de5669331 (diff)
Prefer %userprofile% to %homedrive% and %homepath% for home directory location on Windows.
For some strange reason on my laptop %HOMEDRIVE% comes up as z:\ whereas %userprofile% makes more sense.
-rw-r--r--src/lib/cross_windows.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/cross_windows.cc b/src/lib/cross_windows.cc
index 486e9b5d5..723828d7e 100644
--- a/src/lib/cross_windows.cc
+++ b/src/lib/cross_windows.cc
@@ -394,7 +394,7 @@ maybe_open_console ()
boost::filesystem::path
home_directory ()
{
- return boost::filesystem::path(getenv("HOMEDRIVE")) / boost::filesystem::path(getenv("HOMEPATH"));
+ return boost::filesystem::path(getenv("userprofile"));
}