]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Win 5.1.4: Impossible to load VISU study with med file, that was saved in ASCII mode
authordmv <dmv@opencascade.com>
Fri, 22 Oct 2010 13:27:41 +0000 (13:27 +0000)
committerdmv <dmv@opencascade.com>
Fri, 22 Oct 2010 13:27:41 +0000 (13:27 +0000)
src/HDFPersist/HDFascii.cc

index 9c36800d34e589d22e63d811faf82956e56d573c..592961899c4fce71814f2822d6b021e07956643f 100644 (file)
@@ -123,7 +123,7 @@ char* HDFascii::ConvertFromHDFToASCII(const char* thePath,
   char name[HDF_NAME_MAX_LEN+1];
   int nbsons = hdf_file->nInternalObjects(), nbAttr = hdf_file->nAttributes(); 
 
-  FILE* fp = fopen(aFileName.c_str(), "w");
+  FILE* fp = fopen(aFileName.c_str(), "wb");
   fprintf(fp, "%s\n", ASCIIHDF_ID);
   fprintf(fp, "%i\n", nbsons+nbAttr);
 
@@ -446,6 +446,8 @@ char* HDFascii::ConvertFromASCIIToHDF(const char* thePath,
   char *new_str = new char[ 1+length ];
   strcpy(new_str , aTmpDir.c_str()) ;
 
+  fclose(fp);
+
   return new_str;
 }