no longer delete/re-create att if we dont have to

This commit is contained in:
Ed Hartnett 2018-08-20 05:10:34 -06:00
parent e7b7430e75
commit 0ad7118064

View File

@ -656,15 +656,15 @@ put_att_grpa(NC_GRP_INFO_T *grp, int varid, NC_ATT_INFO_T *att)
BAIL(NC_EATTMETA);
/* Delete the attribute. */
/* if (file_typeid != existing_att_typeid && npoints != att->len) */
if (file_typeid != existing_att_typeid || npoints != att->len)
{
if (H5Adelete(locid, att->hdr.name) < 0)
BAIL(NC_EHDFERR);
}
/* else */
/* { */
/* reuse_att++; */
/* } */
else
{
reuse_att++;
}
}
/* Create the attribute. */