std::string aCommand = aStream.str();
QString comm = QDir::convertSeparators( QString(aCommand.c_str()) );
- const char* cp = comm.latin1();
-
-
- QProcess* proc = new QProcess();
- proc->addArgument( comm );
- if(!proc->start())
- {
- INFOS("VISU_Gen_i::Save - Cann't execute the command :"<<aCommand);
+
+ if(system(comm.latin1())){
+ INFOS("VISU_Gen_i::Save - Cann't execute the command :"<<aCommand);
continue;
- }
-
- //if(system(aCommand.c_str()) != 0){
- // INFOS("VISU_Gen_i::Save - Cann't execute the command :"<<aCommand);
- // continue;
- //}
+ }
}
aFileNames.push_back(aFileName);
aFiles.push_back(aFile);
QString aPrefix("");
if (isMultiFile) aPrefix = SALOMEDS_Tool::GetNameFromPath(aStudy->URL()).c_str();
QString aFileName = aPrefix + "_" + (pResult->GetName()).c_str();
+ QString tmpDir = QDir::convertSeparators( QString(aTmpDir.ToCString()) );;
static QString aCommand;
- aCommand.sprintf("cp %s %s%s",aFileInfo.filePath().latin1(),aTmpDir.ToCString(),aFileName.latin1());
-
- QString comm = QDir::convertSeparators( aCommand );
-
- QProcess* proc = new QProcess();
- proc->addArgument( comm );
- if(!proc->start())
- {
- if(MYDEBUG) MESSAGE("VISU_Gen_i::Save - Can't execute the command :"<<aCommand);
+ aCommand.sprintf("cp %s %s%s",aFileInfo.filePath().latin1(),tmpDir.latin1(),aFileName.latin1());
+
+ if(system(aCommand.latin1())){
+ if(MYDEBUG) MESSAGE("VISU_Gen_i::Save - Can't execute the command :"<<aCommand);
continue;
- }
- else
+ }else
if(MYDEBUG) MESSAGE("VISU_Gen_i::Save - "<<aCommand);
- //int aRes = system(aCommand);
- //if(aRes){
- // if(MYDEBUG) MESSAGE("VISU_Gen_i::Save - Can't execute the command :"<<aCommand);
- // continue;
- //}else
- // if(MYDEBUG) MESSAGE("VISU_Gen_i::Save - "<<aCommand);
+ QString studyPath = tmpDir.append(aFileName);
TCollection_AsciiString aString((char *)(aFileName.latin1()));
- HDFascii::ConvertFromHDFToASCII(strdup((aTmpDir + aString).ToCString()), true);
+ HDFascii::ConvertFromHDFToASCII(strdup(studyPath.latin1()), true);
aFileNames.Append(aString);
}}