HDFFV-10412 moved check back into normal path

This commit is contained in:
Allen Byrne 2018-02-21 16:23:07 -06:00
parent 9f2802f23c
commit 0d912d4632
2 changed files with 32 additions and 20 deletions

View File

@ -310,6 +310,18 @@ Bug Fixes since HDF5-1.10.1 release
Tools
-----
- h5repack
h5repack changes the chunk parameters when a change of layout is not
specified and a filter is applied.
HDFFV-10297, HDFFV-10319 reworked code for h5repack and h5diff code
in the tools library. The check for an existing layout was incorrectly
placed into an if block and not executed. The check was moved into
the normal path of the function.
(ADB - 2018/02/21, HDFFV-10412)
- h5dump
the tools library will hide the error stack during file open.

View File

@ -280,32 +280,32 @@ int apply_filters(const char* name, /* object name from traverse list */
*has_filter = 1;
if (H5Premove_filter(dcpl_id, H5Z_FILTER_ALL) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Premove_filter failed");
/*-------------------------------------------------------------------------
* check if there is an existent chunk
* read it only if there is not a requested layout
*-------------------------------------------------------------------------
*/
if (obj.layout == -1) {
if ((layout = H5Pget_layout(dcpl_id)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_layout failed");
if (layout == H5D_CHUNKED) {
if ((rank = H5Pget_chunk(dcpl_id, NELMTS(chsize), chsize/*out*/)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_chunk failed");
obj.layout = H5D_CHUNKED;
obj.chunk.rank = rank;
for (i = 0; i < rank; i++)
obj.chunk.chunk_lengths[i] = chsize[i];
}
}
}
else if(nfilters) {
*has_filter = 1;
*has_filter = 1;
if (aux_copy_obj(dcpl_id, name, &filtobj) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "aux_copy_obj failed");
}
/*-------------------------------------------------------------------------
* check if there is an existent chunk
* read it only if there is not a requested layout
*-------------------------------------------------------------------------
*/
if (obj.layout == -1) {
if ((layout = H5Pget_layout(dcpl_id)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_layout failed");
if (layout == H5D_CHUNKED) {
if ((rank = H5Pget_chunk(dcpl_id, NELMTS(chsize), chsize/*out*/)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_chunk failed");
obj.layout = H5D_CHUNKED;
obj.chunk.rank = rank;
for (i = 0; i < rank; i++)
obj.chunk.chunk_lengths[i] = chsize[i];
}
}
/*-------------------------------------------------------------------------
* the type of filter and additional parameter
* type can be one of the filters