]> SALOME platform Git repositories - tools/simanio.git/blobdiff - src/SimanIO_Link.cxx
Salome HOME
Checked-out files path was changed to /tmp/SimanSalome/StudyId/ScenarioId/UserId
[tools/simanio.git] / src / SimanIO_Link.cxx
index 7dada805ff54ffdf73d28e38d28c89c5c4093b08..41f5df03b81a69b38f8b8c1803774ebcb2d5efe7 100644 (file)
@@ -108,7 +108,8 @@ SimanIO_Configuration SimanIO_Link::RetrieveConf()
   
   //Parse the response and get the filename
   string aTmpDir = "/tmp";
-  string aClientFileDir = aTmpDir + "/SimanSalome/" + myUser + "/download/";
+  string aClientFileDir = aTmpDir + "/SimanSalome/" + myStudy + "/" + myScenario + "/" + myUser + "/";
+  //string aClientFileDir = aTmpDir + "/SimanSalome/" +  myUser + "/download/";
   string aClientFilePath = aClientFileDir + aResponseFileName;
   
   //Cretae the directories
@@ -184,6 +185,7 @@ SimanIO_Configuration SimanIO_Link::RetrieveConf()
 
 void SimanIO_Link::StoreConf(/*const*/ SimanIO_Configuration& theConf)
 {
+  cout << "StoreConf method is started\n";
   char* aSimanHost = getenv("SIMAN_WS_HOST");
   if (aSimanHost == NULL)
   {
@@ -221,7 +223,8 @@ void SimanIO_Link::StoreConf(/*const*/ SimanIO_Configuration& theConf)
   
   //Prepare salome-siman.conf file
   string aTmpDir = "/tmp";
-  string aClientFileDir = aTmpDir + "/SimanSalome/" + myUser + "/download/";
+  string aClientFileDir = aTmpDir + "/SimanSalome/" + myStudy + "/" + myScenario + "/" + myUser + "/";
+  //string aClientFileDir = aTmpDir + "/SimanSalome/" +  myUser + "/download/";
   string aClientFilePath = aClientFileDir + "salome-siman.conf";
   ofstream aSalomeSimanFile;
   aSalomeSimanFile.open(aClientFilePath.c_str());
@@ -302,5 +305,13 @@ void SimanIO_Link::StoreConf(/*const*/ SimanIO_Configuration& theConf)
   aCheckInRequest->setArgs1(atoll(myUser.c_str()));
   aCheckInResponse = aStub->checkIn(aCheckInRequest);
   
-
+  //Delete the directories
+  system(("rm -r " + aTmpDir + "/SimanSalome/").c_str());
+  
+  //Delete objects
+  delete aPutFileRequest;
+  delete aPutFileResponse;
+  delete aCheckInRequest;
+  delete aCheckInResponse;
+  delete aStub;
 }