Skip to content

Commit

Permalink
No need to defend against truncated string attributes from rhdf5.
Browse files Browse the repository at this point in the history
  • Loading branch information
LTLA committed Dec 1, 2023
1 parent 294a42e commit e6e9fc5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: alabaster.matrix
Title: Load and Save Artifacts from File
Version: 1.3.1
Date: 2023-11-28
Version: 1.3.2
Date: 2023-11-30
Authors@R: person("Aaron", "Lun", role=c("aut", "cre"), email="[email protected]")
License: MIT + file LICENSE
Description:
Expand All @@ -18,7 +18,7 @@ Imports:
DelayedArray (>= 0.27.2),
S4Arrays,
SparseArray,
rhdf5,
rhdf5 (>= 2.47.1),
HDF5Array,
Matrix,
Rcpp
Expand Down
9 changes: 1 addition & 8 deletions R/saveArray.R
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,7 @@ NULL
if (!is.null(optimized$placeholder)) {
dhandle <- H5Dopen(ghandle, "data")
on.exit(H5Dclose(dhandle), add=TRUE, after=FALSE)

# Patch until rhdf5::H5Awrite is fixed.
atype <- optimized$type
if (type(x) == "character") {
atype <- NULL
}

h5_write_attribute(dhandle, missingPlaceholderName, optimized$placeholder, type=atype, scalar=TRUE)
h5_write_attribute(dhandle, missingPlaceholderName, optimized$placeholder, type=optimized$type, scalar=TRUE)
}

save_names(ghandle, x, transpose=TRUE)
Expand Down

0 comments on commit e6e9fc5

Please sign in to comment.