From: dmv Date: Fri, 22 Oct 2010 13:27:41 +0000 (+0000) Subject: Win 5.1.4: Impossible to load VISU study with med file, that was saved in ASCII mode X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c623226d3868388480985aac007ab753f41e369a;p=modules%2Fkernel.git Win 5.1.4: Impossible to load VISU study with med file, that was saved in ASCII mode --- diff --git a/src/HDFPersist/HDFascii.cc b/src/HDFPersist/HDFascii.cc index 9c36800d3..592961899 100644 --- a/src/HDFPersist/HDFascii.cc +++ b/src/HDFPersist/HDFascii.cc @@ -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; }