dtoolutil: Don't use $HOME in Filename::get_home_directory() on Windows

This variable isn't used on Windows systems
This commit is contained in:
rdb 2022-03-01 12:22:25 +01:00
parent 5cfd8db95c
commit dc05889be2

View File

@ -477,7 +477,8 @@ get_home_directory() {
if (AtomicAdjust::get_ptr(_home_directory) == nullptr) {
Filename home_directory;
// In all environments, check $HOME first.
// In all environments except Windows, check $HOME first.
#ifndef _WIN32
char *home = getenv("HOME");
if (home != nullptr) {
Filename dirname = from_os_specific(home);
@ -487,6 +488,7 @@ get_home_directory() {
}
}
}
#endif
if (home_directory.empty()) {
#ifdef _WIN32