Skip to content
Snippets Groups Projects
Commit a3f8f515 authored by Joscha Schmiedt's avatar Joscha Schmiedt
Browse files

NEW: Add Win32 way for retreiving home folder

parent e4795781
No related branches found
No related tags found
2 merge requests!61Release 0.3.0,!48Fix compilation errors on Windows
...@@ -172,8 +172,12 @@ auto load_json_file(const path &json_file) -> JsonValue; ...@@ -172,8 +172,12 @@ auto load_json_file(const path &json_file) -> JsonValue;
auto base64_encode(const std::string &plain) -> std::string; auto base64_encode(const std::string &plain) -> std::string;
inline auto get_home_directory() -> const path { inline auto get_home_directory() -> const path {
#if defined(_WIN32)
const auto *const home = getenv("USERPROFILE");
#else
const auto *const home = getenv("HOME"); const auto *const home = getenv("HOME");
// TODO(tf) Add windowsy way of determining the home directory #endif
return home; return home;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment