diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2016-04-15 04:18:02 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2016-04-15 04:18:02 (GMT) |
commit | 58382379be519527e74343dade9efc5bed6f81b3 (patch) | |
tree | 31bd36c36fbc363d72a15af8a882c2b87ae204e8 /src/H5F.c | |
parent | b79b00dbfc603b8a70c0cf50585e07c15da8b7d2 (diff) | |
download | hdf5-58382379be519527e74343dade9efc5bed6f81b3.zip hdf5-58382379be519527e74343dade9efc5bed6f81b3.tar.gz hdf5-58382379be519527e74343dade9efc5bed6f81b3.tar.bz2 |
[svn-r29702] Merged r29182 and 29183 from the trunk.
Fixes HDFFV-8740 (external file storage relative path fix).
Tested on: 64-bit Ubuntu 15.10 (Linux 4.2.0 x86_64) gcc 5.2.1
serial autotools w/ C++ & Fortran
parallel autotools (MPICH 3.1.4) w/ Fortran
serial CMake
Diffstat (limited to 'src/H5F.c')
-rw-r--r-- | src/H5F.c | 15 |
1 files changed, 6 insertions, 9 deletions
@@ -815,10 +815,6 @@ done: * Programmer: Robb Matzke * Friday, October 16, 1998 * - * Modifications: - * Quincey Koziol, May 14, 2002 - * Keep old file's read/write intent in reopened file. - * *------------------------------------------------------------------------- */ hid_t @@ -833,26 +829,27 @@ H5Freopen(hid_t file_id) /* Check arguments */ if(NULL == (old_file = (H5F_t *)H5I_object_verify(file_id, H5I_FILE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file") /* Get a new "top level" file struct, sharing the same "low level" file struct */ if(NULL == (new_file = H5F_new(old_file->shared, 0, H5P_FILE_CREATE_DEFAULT, H5P_FILE_ACCESS_DEFAULT, NULL))) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to reopen file") + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to reopen file") /* Duplicate old file's names */ new_file->open_name = H5MM_xstrdup(old_file->open_name); new_file->actual_name = H5MM_xstrdup(old_file->actual_name); + new_file->extpath = H5MM_xstrdup(old_file->extpath); if((ret_value = H5I_register(H5I_FILE, new_file, TRUE)) < 0) - HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to atomize file handle") + HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to atomize file handle") /* Keep this ID in file object structure */ new_file->file_id = ret_value; done: if(ret_value < 0 && new_file) - if(H5F_dest(new_file, H5AC_dxpl_id, FALSE) < 0) - HDONE_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "can't close file") + if(H5F_dest(new_file, H5AC_dxpl_id, FALSE) < 0) + HDONE_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "can't close file") FUNC_LEAVE_API(ret_value) } /* end H5Freopen() */ |