From: Carl Hetherington Date: Sun, 26 Sep 2021 19:42:02 +0000 (+0200) Subject: Prefer %userprofile% to %homedrive% and %homepath% for home directory location on... X-Git-Tag: v2.15.163~3 X-Git-Url: https://git.carlh.net/gitweb/?a=commitdiff_plain;h=a3d4dfb4357a265d4c3a4bfafe7d17a8ecc72f66;p=dcpomatic.git 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. --- 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")); }