Browse Source

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

This variable isn't used on Windows systems
rdb 3 years ago
parent
commit
dc05889be2
1 changed files with 3 additions and 1 deletions
  1. 3 1
      dtool/src/dtoolutil/filename.cxx

+ 3 - 1
dtool/src/dtoolutil/filename.cxx

@@ -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