Skip to content

Commit 2f90694

Browse files
committed
fix replace in writeImageArray
1 parent 6bc6923 commit 2f90694

3 files changed

Lines changed: 7 additions & 8 deletions

File tree

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: ImageArray
22
Type: Package
33
Title: ImageArray: a framework for on-disk and in-memory image arrays
4-
Version: 0.99.5
4+
Version: 0.99.6
55
Date: 2026-01-20
66
Authors@R:
77
person("Artür", "Manukyan",

R/ImageArray.R

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -519,9 +519,10 @@ writeImageArray <- function(
519519
stop("'replace' must be TRUE or FALSE")
520520
}
521521
if (replace) {
522-
if (file.exists(ondisk_path)) {
522+
if (file.exists(ondisk_path))
523523
file.remove(ondisk_path)
524-
}
524+
if(dir.exists(ondisk_path))
525+
unlink(ondisk_path, recursive = TRUE)
525526
}
526527

527528
# make Image Array

man/ImageArray-methods.Rd

Lines changed: 3 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)