diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/h5repack/h5repack.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/tools/h5repack/h5repack.c b/tools/h5repack/h5repack.c index 4c279fd..0f16e87 100644 --- a/tools/h5repack/h5repack.c +++ b/tools/h5repack/h5repack.c @@ -462,8 +462,16 @@ int copy_attr(hid_t loc_in, if(H5Fclose(fidout) < 0) goto error; + } + else + { + if (options->use_native==1) + wtype_id = h5tools_get_native_type(ftype_id); + else + wtype_id = H5Tcopy(ftype_id); } /* end if */ + /* get the dataspace handle */ if ((space_id = H5Aget_space( attr_id )) < 0 ) goto error; @@ -476,15 +484,6 @@ int copy_attr(hid_t loc_in, for (j=0; j<rank; j++) nelmts*=dims[j]; - /* wtype_id will have already been set if using a named dtype */ - if(!is_named) - { - if (options->use_native==1) - wtype_id = h5tools_get_native_type(ftype_id); - else - wtype_id = H5Tcopy(ftype_id); - } /* end if */ - if ((msize=H5Tget_size(wtype_id))==0) goto error; |