Salome HOME
Now files with derictive file-import are imported
authorbri <bri@opencascade.com>
Mon, 10 Feb 2014 14:13:31 +0000 (18:13 +0400)
committerbri <bri@opencascade.com>
Mon, 10 Feb 2014 14:13:31 +0000 (18:13 +0400)
src/SimanIO_Link.cxx

index 41f5df03b81a69b38f8b8c1803774ebcb2d5efe7..fca55dd631feeda5df958137eeeaeeac7ce04bf5 100644 (file)
@@ -41,7 +41,6 @@ SimanIO_Configuration SimanIO_Link::RetrieveConf()
   SimanIO_Configuration aResult;
   // for now use simple initial cfg file for testings purposes only
   // in the future this file must be downloaded from the SIMAN server somehow
-  //const char* aCFGFile = "/dn20/salome/mpv/siman/text1.conf";
   
   char* aSimanHost = getenv("SIMAN_WS_HOST");
   if (aSimanHost == NULL)
@@ -92,8 +91,6 @@ SimanIO_Configuration SimanIO_Link::RetrieveConf()
   
   string aResponseFilePath = aCreateConfigFileResponse->get_return();
   
-  //cout << "Response file path = " << aResponseFilePath << "\n";
-  
   string aResponseFileName = aResponseFilePath.substr(aResponseFilePath.find_last_of("/\\")+1);
   
   //Get the created config file to client
@@ -142,15 +139,13 @@ SimanIO_Configuration SimanIO_Link::RetrieveConf()
         int startUnderlineIndex = aFileName.find_first_of("_") + 1;
         string aSourceFileName = aFileName.substr(startUnderlineIndex);
         
-        //cout << "aURL = " << "http://" << aSimanWSHost << "/repository/" << aURL << "\n";
+        //cout << "aURL = " << aURL << "\n";
         string aPathToVault = aResponseFilePath.substr(0, aResponseFilePath.find("download")) + "vault/";
         
         //only for test only for WIN
         //replace(aURL.begin(),aURL.end(),'/','\\');
         //end only for test only for WIN
         
-        //cout << "Path to vault" << aPathToVault + aURL << "\n";
-        
         //Get the files
         //aGetFileRequest->setArgs0("http://" + aSimanWSHost + "/repository/" + aURL);
         aGetFileRequest->setArgs0(aPathToVault + aURL);
@@ -166,7 +161,7 @@ SimanIO_Configuration SimanIO_Link::RetrieveConf()
         delete[] aCopyBuffer;
 
         //Set new URLs
-        aFileIter.SetURL((aClientFileDir + aFileName).c_str());
+        aFileIter.SetURL((aClientFileDir + aSourceFileName).c_str());
         //cout << "New location of the files " << aClientFileDir + aFileName << "\n";
       }//aFileIter
     }//aDocIter