Prefer %userprofile% to %homedrive% and %homepath% for home directory location on...
authorCarl Hetherington <cth@carlh.net>
Sun, 26 Sep 2021 19:42:02 +0000 (21:42 +0200)
committerCarl Hetherington <cth@carlh.net>
Sun, 26 Sep 2021 19:51:04 +0000 (21:51 +0200)
For some strange reason on my laptop %HOMEDRIVE% comes up as z:\
whereas %userprofile% makes more sense.

src/lib/cross_windows.cc

index 486e9b5d588748cc56d738f035edfbdfd084103b..723828d7e235dce6617e01041389756ad6201620 100644 (file)
@@ -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"));
 }