From: abn Date: Wed, 21 Oct 2015 13:13:19 +0000 (+0200) Subject: Fixed ugly bug on TMP directory in ParaMEDMEM test ... X-Git-Tag: V8_0_pre~7 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a4fb51cf907087134d7d42ff54b29e820ff5723b;p=modules%2Fmed.git Fixed ugly bug on TMP directory in ParaMEDMEM test ... --- diff --git a/src/ParaMEDMEMTest/ParaMEDMEMTest_InterpKernelDEC.cxx b/src/ParaMEDMEMTest/ParaMEDMEMTest_InterpKernelDEC.cxx index 20343e9e7..2350a88c8 100644 --- a/src/ParaMEDMEMTest/ParaMEDMEMTest_InterpKernelDEC.cxx +++ b/src/ParaMEDMEMTest/ParaMEDMEMTest_InterpKernelDEC.cxx @@ -859,8 +859,11 @@ void ParaMEDMEMTest::testInterpKernelDEC_3D_(const char *srcMeth, const char *ta ParaMEDMEM::ParaFIELD* parafield; ICoCo::MEDField* icocofield ; - string tmp_dir = getenv("TMP"); - if (tmp_dir == "") + char * tmp_dir_c = getenv("TMP"); + string tmp_dir; + if (tmp_dir_c != NULL) + tmp_dir = string(tmp_dir_c); + else tmp_dir = "/tmp"; string filename_xml1 = getResourceFile("Mesh3D_10_2d"); string filename_xml2 = getResourceFile("Mesh3D_11"); @@ -2108,8 +2111,11 @@ void ParaMEDMEMTest::testAsynchronousInterpKernelDEC_2D(double dtA, double tmaxA ICoCo::MEDField* icocofield ; - string tmp_dir = getenv("TMP"); - if (tmp_dir == "") + char * tmp_dir_c = getenv("TMP"); + string tmp_dir; + if (tmp_dir_c != NULL) + tmp_dir = string(tmp_dir_c); + else tmp_dir = "/tmp"; string filename_xml1 = getResourceFile("square1_split"); string filename_xml2 = getResourceFile("square2_split");