if(theIsMultiFile){
aFileName = SALOMEDS_Tool::GetNameFromPath(aStudy->URL()) + aFileName;
- std::ostringstream aStream;
+
+
+
+ //std::ostringstream aStream;
#ifndef WNT
- aStream<<"cp "<<aFile<<" "<<aTmpDir<<aFileName;
+ QString aCommand( " cp %s %s%s " );
#else
- aStream<<"xcopy "<<aFile<<" "<<aTmpDir<<aFileName<<" /Y /Q ";
+ QString aCommand( " xcopy %s %s%s " );
#endif
- std::string aCommand = aStream.str();
+ aCommand.arg( aFile ).arg( aTmpDir ).arg( aFileName );
+ aCommand = QDir::convertSeparators( aCommand );
- QString comm = QDir::convertSeparators( QString(aCommand.c_str()) );
+#ifdef WNT
+ aCommand += " /Y /R ";
+#endif
- if(system(comm.latin1())){
+ //printf( "VISU_Gen_i::Save %s", aCommand.latin1() );
+ if(system(aCommand.latin1())){
INFOS("VISU_Gen_i::Save - Cann't execute the command :"<<aCommand);
continue;
}
#ifndef WNT
aCommand.sprintf("cp %s %s%s",aFileInfo.filePath().latin1(),tmpDir.latin1(),aFileName.latin1());
#else
- aCommand.sprintf("xcopy %s %s%s /Y /Q",aFileInfo.filePath().latin1(),tmpDir.latin1(),aFileName.latin1());
+ aCommand.sprintf("xcopy %s %s%s",aFileInfo.filePath().latin1(),tmpDir.latin1(),aFileName.latin1());
+#endif
+ aCommand = QDir::convertSeparators( aCommand );
+#ifdef WNT
+ aCommand += " /Y /R";
#endif
-
+ //printf( "VISU_Gen_i::SaveASCII %s ", aCommand.latin1() );
if(system(aCommand.latin1())){
if(MYDEBUG) MESSAGE("VISU_Gen_i::Save - Can't execute the command :"<<aCommand);
continue;
#ifndef WNT
aCommand.sprintf("cp %s %s",
#else
- aCommand.sprintf("xcopy %s %s /Y /Q",
+ aCommand.sprintf("xcopy %s %s /Y /R",
#endif
- aFileInfo.filePath().latin1(),
- aFullFileName.c_str());
+ QDir::convertSeparators( aFileInfo.filePath() ).latin1(),
+ QDir::convertSeparators( aFullFileName.c_str()).latin1());
+ //printf( " VISU_Gen_i::CopyFrom: %s", aCommand.latin1() );
if(system(aCommand) == -1) {
if(MYDEBUG) MESSAGE("VISU_Gen_i::Copy - Cann't execute the command :"<<aCommand);
return NULL;
#include <qfileinfo.h>
#include <qsemaphore.h>
#include <qthread.h>
+#include <qdir.h>
// VTK Includes
#include <vtkCell.h>
#ifndef WNT
aCommand.sprintf("cp %s %s",
#else
- aCommand.sprintf("xcopy %s %s /Y /Q",
+ aCommand.sprintf("xcopy %s %s",
#endif
myFileInfo.absFilePath().latin1(),aTmpDir.c_str());
+ aCommand = QDir::convertSeparators( aCommand );
+
+#ifdef WNT
+ aCommand += " /Y /R";
+#endif
+
if(system(aCommand) == -1){
MESSAGE("Create - Can't execute the command :"<<aCommand);
return NULL;