From a3d4dfb4357a265d4c3a4bfafe7d17a8ecc72f66 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 26 Sep 2021 21:42:02 +0200 Subject: [PATCH] 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. --- src/lib/cross_windows.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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")); } -- 2.30.2