From: eap Date: Tue, 30 Aug 2005 12:50:44 +0000 (+0000) Subject: Add a more comfort way to specify path to user ImportExport file X-Git-Tag: V_3_0_2~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=fa93d888ac54ecd3e45f82c695f62739f5903703;p=modules%2Fgeom.git Add a more comfort way to specify path to user ImportExport file --- diff --git a/src/GEOMImpl/GEOMImpl_IInsertOperations.cxx b/src/GEOMImpl/GEOMImpl_IInsertOperations.cxx index 3ef529498..9affafa27 100644 --- a/src/GEOMImpl/GEOMImpl_IInsertOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_IInsertOperations.cxx @@ -358,12 +358,21 @@ Standard_Boolean GEOMImpl_IInsertOperations::InitResMgr() #else aResDir += "/share/salome/resources"; #endif - TCollection_AsciiString aUserResDir (getenv("HOME")); + char * dir = getenv("GEOM_ENGINE_RESOURCES_DIR"); + TCollection_AsciiString aUserResDir; + if ( dir ) + { + aUserResDir = dir; + } + else + { + aUserResDir = getenv("HOME"); #ifdef WNT - aUserResDir += "\\.salome\\resources"; + aUserResDir += "\\.salome\\resources"; #else - aUserResDir += "/.salome/resources"; + aUserResDir += "/.salome/resources"; #endif + } myResMgr = new Resource_Manager ("ImportExport", aResDir, aUserResDir, Standard_False); if (!myResMgr->Find("Import") && !myResMgr->Find("Export")) {