summaryrefslogtreecommitdiffstats
path: root/src/H5T.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5T.c')
-rw-r--r--src/H5T.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/H5T.c b/src/H5T.c
index 1e10135..5f6b8ad 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -2874,10 +2874,12 @@ H5T_copy(const H5T_t *old_dt, H5T_copy_t method)
case H5T_COPY_ALL:
/*
* Return a transient type (locked or unlocked) or an unopened named
- * type.
+ * type. Immutable transient types are degraded to read-only.
*/
if (H5T_STATE_OPEN==new_dt->state) {
new_dt->state = H5T_STATE_NAMED;
+ } else if (H5T_STATE_IMMUTABLE==new_dt->state) {
+ new_dt->state = H5T_STATE_RDONLY;
}
break;