diff options
Diffstat (limited to 'c++/src/H5Object.cpp')
-rw-r--r-- | c++/src/H5Object.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/c++/src/H5Object.cpp b/c++/src/H5Object.cpp index cae9155..0b6c20e 100644 --- a/c++/src/H5Object.cpp +++ b/c++/src/H5Object.cpp @@ -103,7 +103,7 @@ Attribute H5Object::createAttribute( const char* name, const DataType& data_type hid_t type_id = data_type.getId(); hid_t space_id = data_space.getId(); hid_t plist_id = create_plist.getId(); - hid_t attr_id = H5Acreate( id, name, type_id, space_id, plist_id ); + hid_t attr_id = H5Acreate2(id, ".", name, type_id, space_id, plist_id, H5P_DEFAULT, H5P_DEFAULT ); // If the attribute id is valid, create and return the Attribute object if( attr_id > 0 ) @@ -112,9 +112,7 @@ Attribute H5Object::createAttribute( const char* name, const DataType& data_type return( attr ); } else - { - throw AttributeIException(inMemFunc("createAttribute"), "H5Acreate failed"); - } + throw AttributeIException(inMemFunc("createAttribute"), "H5Acreate2 failed"); } //-------------------------------------------------------------------------- |