Skip to content

Commit

Permalink
Merge branch 'devel' of https://github.com/pachterlab/alabaster.sfe i…
Browse files Browse the repository at this point in the history
…nto devel
  • Loading branch information
lambdamoses committed Dec 4, 2024
2 parents 7dc5e56 + 41dede4 commit 3c3edd8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/saveImages.R
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ setMethod("saveObject", "SpatRaster", function(x, path, ...) {
# That what the !inMemory(x) is for. Resaving with writeRaster is slow
if (is_geotiff || !inMemory(x)) {
ex <- .file_ext(f)
file.copy(f, file.path(path, paste0("image", ex)))
fs::file_copy(f, file.path(path, paste0("image", ex)))
} else {
writeRaster(x, file.path(path, "image.tiff"), ...)
}
Expand Down Expand Up @@ -97,10 +97,10 @@ setMethod("saveObject", "BioFormatsImage", function(x, path, ...) {
if (length(fns) > 1L) {
new_dir <- file.path(path, "image")
dir.create(new_dir)
file.copy(fns, new_dir)
fs::file_copy(fns, new_dir)
} else {
ex <- .file_ext(f)
file.copy(f, file.path(path, paste0("image", ex)))
fs::file_copy(f, file.path(path, paste0("image", ex)))
}
})

Expand Down

0 comments on commit 3c3edd8

Please sign in to comment.