changed: open hdf5 file in read only in the converter application

no idea how this was lost, i thought i did it ages ago...

git-svn-id: http://svn.sintef.no/trondheim/IFEM/trunk@1166 e10b68d5-8a6e-419e-a041-bce267b0401d
This commit is contained in:
akva 2011-09-21 10:15:04 +00:00 committed by Knut Morten Okstad
parent a01a158dd5
commit 375e40287b

View File

@ -34,7 +34,9 @@ HDF5Writer::HDF5Writer (const std::string& name, bool append, bool keepOpen)
#ifdef HAS_HDF5
struct stat temp;
// file already exists - open and find the next group
if (append && stat(m_name.c_str(),&temp) == 0)
if (append && keepOpen)
m_flag = H5F_ACC_RDONLY;
else if (append && stat(m_name.c_str(),&temp) == 0)
m_flag = H5F_ACC_RDWR;
else
m_flag = H5F_ACC_TRUNC;