summaryrefslogtreecommitdiffstats
path: root/tools/h5copy/h5copy.c
diff options
context:
space:
mode:
authorJonathan Kim <jkm@hdfgroup.org>2010-10-15 00:17:51 (GMT)
committerJonathan Kim <jkm@hdfgroup.org>2010-10-15 00:17:51 (GMT)
commit07a4684190f592e8a4d29c0910a5f90374056795 (patch)
treea6168d589dd7eae86d6224e0ed1fa8a62f18e51f /tools/h5copy/h5copy.c
parent6a83768826bbe47264798a5ccd4514b3c605ac1b (diff)
downloadhdf5-07a4684190f592e8a4d29c0910a5f90374056795.zip
hdf5-07a4684190f592e8a4d29c0910a5f90374056795.tar.gz
hdf5-07a4684190f592e8a4d29c0910a5f90374056795.tar.bz2
[svn-r19605] Purpose:
Backout the previous changes (r19598): (Fix for bug# 2040 - h5copy should fail gracefully for expected failure copying to non-exist nested group without -p option.) Description: Some failure occurred on talwit, so backout the changes and will put it back after the fix. (Fixed h5copy to fail gracefully when copying object to non-exist group without -p option. This is expected to be failed. Merged from hdf5 trunk r19598.)
Diffstat (limited to 'tools/h5copy/h5copy.c')
-rw-r--r--tools/h5copy/h5copy.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/tools/h5copy/h5copy.c b/tools/h5copy/h5copy.c
index 595864e..eb16754 100644
--- a/tools/h5copy/h5copy.c
+++ b/tools/h5copy/h5copy.c
@@ -215,8 +215,6 @@ main (int argc, const char *argv[])
int opt;
int li_ret;
h5tool_link_info_t linkinfo;
- int i, len;
- char *str_prt=NULL;
h5tools_setprogname(PROGRAMNAME);
h5tools_setstatus(EXIT_SUCCESS);
@@ -408,23 +406,6 @@ main (int argc, const char *argv[])
if(verbose)
printf("%s: Creating parent groups\n", h5tools_getprogname());
} /* end if */
- else /* error, if parent groups doesn't already exist in destination file */
- {
- len = strlen(oname_dst);
- /* check if all the parents groups exist. skip root group */
- for (i = 1; i < len-1; i++)
- {
- if ('/'==oname_dst[i])
- {
- str_prt = strndup(oname_dst, (size_t)i);
- if (H5Lexists(fid_dst, str_prt, H5P_DEFAULT) <= 0)
- {
- error_msg("group <%s> doesn't exist. Use -p to create parent groups.\n");
- goto error;
- }
- }
- }
- }
/*-------------------------------------------------------------------------
* do the copy
@@ -478,8 +459,6 @@ main (int argc, const char *argv[])
free(oname_dst);
if (oname_src)
free(oname_src);
- if (str_prt)
- free(str_prt);
h5tools_close();
@@ -506,8 +485,6 @@ error:
free(oname_dst);
if (oname_src)
free(oname_src);
- if (str_prt)
- free(str_prt);
h5tools_close();