summaryrefslogtreecommitdiffstats
path: root/tools/h5repack/h5repack_copy.c
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2008-08-25 15:57:14 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2008-08-25 15:57:14 (GMT)
commit0c8cee593ff5907958fbe89de8a3bf6d1fe5b039 (patch)
tree32650b9979f7abf86b90215f3244ab74ed2df6e4 /tools/h5repack/h5repack_copy.c
parent769daf5479e7dc476611981317869ad27cb2c621 (diff)
downloadhdf5-0c8cee593ff5907958fbe89de8a3bf6d1fe5b039.zip
hdf5-0c8cee593ff5907958fbe89de8a3bf6d1fe5b039.tar.gz
hdf5-0c8cee593ff5907958fbe89de8a3bf6d1fe5b039.tar.bz2
[svn-r15526] userblock options
only write the user block of a pre-existing file with user block in case there is no input user block file tested: windows, linux
Diffstat (limited to 'tools/h5repack/h5repack_copy.c')
-rw-r--r--tools/h5repack/h5repack_copy.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/h5repack/h5repack_copy.c b/tools/h5repack/h5repack_copy.c
index 3bff946..766da44 100644
--- a/tools/h5repack/h5repack_copy.c
+++ b/tools/h5repack/h5repack_copy.c
@@ -23,7 +23,7 @@
extern char *progname;
-#if 0
+#if 1
#define H5REPACK_DEBUG
#endif
@@ -203,7 +203,7 @@ int copy_objects(const char* fnamein,
*-------------------------------------------------------------------------
*/
- if ( options->ublock_size > 0 && options->ublock_filename != NULL )
+ if ( options->ublock_size > 0 )
{
/* either use the FCPL already created or create a new one */
if(fcpl != H5P_DEFAULT)
@@ -261,7 +261,7 @@ int copy_objects(const char* fnamein,
* write a new user block if requested
*-------------------------------------------------------------------------
*/
- if ( options->ublock_size > 0 && options->ublock_filename != NULL )
+ if ( options->ublock_size > 0 )
{
copy_user_block( options->ublock_filename, fnameout, options->ublock_size);
}
@@ -312,7 +312,8 @@ int copy_objects(const char* fnamein,
H5Fclose(fidin);
H5Fclose(fidout);
- if(ub_size > 0)
+ /* write only the input file user block if there is no user block file input */
+ if(ub_size > 0 && options->ublock_size == 0)
copy_user_block(fnamein, fnameout, ub_size);
return 0;