diff liboctave/oct-env.cc @ 5451:ed08548b9054

[project @ 2005-09-15 19:52:50 by jwe]
author jwe
date Thu, 15 Sep 2005 19:52:50 +0000
parents 4c8a2e4e0717
children a921c9c17ba5
line wrap: on
line diff
--- a/liboctave/oct-env.cc	Thu Sep 15 15:36:26 2005 +0000
+++ b/liboctave/oct-env.cc	Thu Sep 15 19:52:50 2005 +0000
@@ -367,6 +367,12 @@
 {
   std::string hd = do_getenv ("HOME");
 
+#if defined (__MINGW32__)
+  // Maybe we are started directly from cmd.exe
+  if (hd.empty ())
+    hd = do_getenv ("HOMEPATH");
+#endif
+
   if (hd.empty ())
     {
       octave_passwd pw = octave_passwd::getpwuid (octave_syscalls::getuid ());