From dda63d3fb708fd3a38dd9e63f72a8fd24e83229a Mon Sep 17 00:00:00 2001 From: Artur-man Date: Tue, 21 Jul 2026 22:00:52 +0200 Subject: [PATCH] rmv extra paste0 --- R/ZarrSparseMatrixSeed-class.R | 2 +- R/utils.R | 2 -- tests/testthat/test-writeZarrArray.R | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/R/ZarrSparseMatrixSeed-class.R b/R/ZarrSparseMatrixSeed-class.R index b0542f5..82c3f11 100644 --- a/R/ZarrSparseMatrixSeed-class.R +++ b/R/ZarrSparseMatrixSeed-class.R @@ -210,7 +210,7 @@ read_sparse_zarr_component <- function(zarr_store, group, name, if (!zarr_exists(zarr_store, group)) stop(wmsg("Group \"", group, "\" does not exist in this Zarr store")) if (zarr_node_is_dataset(zarr_store, group)) { - is_X_or_layer <- group == "/X" || startsWith(group, "/layers/") + is_X_or_layer <- group == "X" || startsWith(group, "layers") msg1 <- c("\"", group, "\" is a Zarrr dataset, not a Zarr group, ", "so it looks like the matrix that you are trying to ", "access is not stored in a sparse format. Please ", diff --git a/R/utils.R b/R/utils.R index 64ee5bf..20ac41a 100644 --- a/R/utils.R +++ b/R/utils.R @@ -121,8 +121,6 @@ normarg_zarr_group <- function(name, what1="'name'", stop(wmsg(what1, " cannot be the empty string")) if (startsWith(name, "/")) { name <- sub("^/*", "/", name) # only keep first leading slash - } else { - name <- paste0("/", name) } name } diff --git a/tests/testthat/test-writeZarrArray.R b/tests/testthat/test-writeZarrArray.R index b81598d..fbcb301 100644 --- a/tests/testthat/test-writeZarrArray.R +++ b/tests/testthat/test-writeZarrArray.R @@ -4,7 +4,7 @@ test_that("ZarrRealizationSink()", { sink <- ZarrRealizationSink(c(85, 20, 300), zarr_version=zarr_version) expect_true(is(sink, "ZarrRealizationSink")) expect_true(is(sink, "RealizationSink")) - format <- ZarrArray:::get_zarr_format(paste0(sink@zarr_path, "/")) + format <- ZarrArray:::get_zarr_format(sink@zarr_path) expect_identical(format, zarr_version) seed <- as(sink, "ZarrArraySeed") expect_true(is(seed, "ZarrArraySeed"))