We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dc8566f commit f6c59a8Copy full SHA for f6c59a8
R/tar-terra-rast.R
@@ -137,7 +137,10 @@ tar_terra_rast <- function(name,
137
tar_rast_read <- function(preserve_metadata) {
138
switch(preserve_metadata,
139
zip = function(path) {
140
- tmp <- withr::local_tempdir()
+ tmp <- tempdir()
141
+ # NOTE: cannot use withr::local_tempdir() because the unzipped files need
142
+ # to persist so that the resulting `SpatRaster` object doesn't have a
143
+ # broken file pointer
144
zip::unzip(zipfile = path, exdir = tmp)
145
terra::rast(file.path(tmp, basename(path)))
146
},
0 commit comments