]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Add a more comfort way to specify path to user ImportExport file
authoreap <eap@opencascade.com>
Tue, 30 Aug 2005 12:50:44 +0000 (12:50 +0000)
committereap <eap@opencascade.com>
Tue, 30 Aug 2005 12:50:44 +0000 (12:50 +0000)
src/GEOMImpl/GEOMImpl_IInsertOperations.cxx

index 3ef52949892fb3a66a3b99da22d0d39e756a915a..9affafa27a001ed8cb976342e5ab277350836b3d 100644 (file)
@@ -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")) {