diff options
author | jhendersonHDF <jhenderson@hdfgroup.org> | 2024-02-22 20:52:36 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-22 20:52:36 (GMT) |
commit | 46f7aa75fd09b5a61ea62e917634abe45ec41476 (patch) | |
tree | 6c4d6a163270ccefe350273b8fac583aa21dcbb0 /src/H5Pfapl.c | |
parent | f1e8f42b5ae28d11562624738cd92e8c086cadfe (diff) | |
download | hdf5-46f7aa75fd09b5a61ea62e917634abe45ec41476.zip hdf5-46f7aa75fd09b5a61ea62e917634abe45ec41476.tar.gz hdf5-46f7aa75fd09b5a61ea62e917634abe45ec41476.tar.bz2 |
Fix H5F_get_access_plist to copy file locking settings (#4030)
H5F_get_access_plist previously did not copy over the file locking settings
from a file into the new File Access Property List that it creates. This would
make it difficult to match the file locking settings between an external file
and its parent file.
Diffstat (limited to 'src/H5Pfapl.c')
-rw-r--r-- | src/H5Pfapl.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c index e7c1fb3..e9496bf 100644 --- a/src/H5Pfapl.c +++ b/src/H5Pfapl.c @@ -4978,7 +4978,9 @@ H5Pget_file_locking(hid_t fapl_id, hbool_t *use_file_locking /*out*/, hbool_t *i H5TRACE3("e", "ixx", fapl_id, use_file_locking, ignore_when_disabled); /* Make sure this is a fapl */ - if (true != H5P_isa_class(fapl_id, H5P_FILE_ACCESS)) + if (H5P_DEFAULT == fapl_id) + fapl_id = H5P_FILE_ACCESS_DEFAULT; + else if (true != H5P_isa_class(fapl_id, H5P_FILE_ACCESS)) HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "property list is not an access plist"); /* Get the plist structure */ |