+
+ if (HDFascii::isASCII(myFileInfo.filePath().latin1())) {
+ char* aResultPath = HDFascii::ConvertFromASCIIToHDF(myFileInfo.filePath().latin1());
+ char* aHDFFileName = new char[strlen(aResultPath) + 19];
+ sprintf(aHDFFileName, "%shdf_from_ascii.hdf", aResultPath);
+
+ if (IsMultifile()) { // set this file as new - temporary
+ static QString aCommand;
+ aCommand.sprintf("mv %s %s%s",aHDFFileName, aResultPath, myFileInfo.baseName().latin1());
+ if(system(aCommand) == -1){
+ if(MYDEBUG) MESSAGE("VISU::Result_i::Restore - Can't execute the command :"<<aCommand);
+ return NULL;
+ } else if(MYDEBUG) MESSAGE("VISU::Result_i::Restore - "<<aCommand);
+ myFileInfo.setFile(QString(aResultPath)+QString(myFileInfo.baseName().latin1()));
+ } else { // change current temporary file to the new: with hdf-format
+ static QString aCommand;
+ aCommand.sprintf("mv %s %s\0",aHDFFileName, myFileInfo.filePath().latin1());
+ if(system(aCommand.latin1()) == -1) {
+ if(MYDEBUG) MESSAGE("VISU::Result_i::Restore - Can't execute the command :"<<aCommand);
+ return NULL;
+ } else if(MYDEBUG) MESSAGE("VISU::Result_i::Restore - "<<aCommand);
+ SALOMEDS::ListOfFileNames_var anEmptyList = new SALOMEDS::ListOfFileNames;
+ SALOMEDS_Tool::RemoveTemporaryFiles(aResultPath, anEmptyList, true);
+ }
+ mySourceId = eRestoredFile;
+ delete(aResultPath);
+ delete(aHDFFileName);
+ } else if (!IsMultifile()) mySourceId = eRestoredFile;
+ else mySourceId = eFile;
+