]> SALOME platform Git repositories - modules/kernel.git/blobdiff - src/Launcher/Launcher_Job.cxx
Salome HOME
Compilation under Windows: add missing header
[modules/kernel.git] / src / Launcher / Launcher_Job.cxx
index 81fd5fc2cf94b407cd2cc0ceba7a4b5822b672de..01cbbc99e77e2eff6b42e1af1aece3bb6b788e1b 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2009-2019  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2009-2021  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -22,6 +22,9 @@
 //#define _DEBUG_
 #include "Launcher_Job.hxx"
 #include "Launcher.hxx"
+
+#include <Basics_DirUtils.hxx>
+
 #include <boost/filesystem.hpp>
 
 #ifdef WITH_LIBBATCH
@@ -667,11 +670,8 @@ Launcher::Job::common_job_params()
 
   // If result_directory is not defined, we use HOME environment
   if (_result_directory == "")
-#ifndef WIN32
-    _result_directory = getenv("HOME");
-#else
-    _result_directory = getenv("USERPROFILE");
-#endif
+    _result_directory = Kernel_Utils::HomePath();
+
   // _in_files
   std::list<std::string> in_files(_in_files);
   in_files.push_back(_job_file);