Skip to content

Commit 66572df

Browse files
committed
CBMsourcePrepInputs uses preProcess instead of prepInputs; download.file mode = "wb"
1 parent fcf31dd commit 66572df

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Description: Implementation of several components of the Carbon Budget Model of
55
Canadian Forest Service (v3).
66
URL:
77
https://github.com/PredictiveEcology/CBMutils
8-
Version: 2.5.4.9000
8+
Version: 2.5.4.9001
99
Authors@R: c(
1010
person("Céline", "Boisvenue", email = "celine.boisvenue@nrcan-rncan.gc.ca", role = c("aut", "cre")),
1111
person("Alex M", "Chubaty", email = "achubaty@for-cast.ca", role = c("aut"), comment = c(ORCID = "0000-0001-7146-8135")),

R/Data-CBMsources.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,17 +59,19 @@ CBMsourcePrepInputs <- function(sourceID,
5959
srcUq <- unique(srcItems[, .SD, .SDcols = c("targetFile", "url")])
6060
srcUq$path <- sapply(1:nrow(srcUq), function(i){
6161

62-
reproducible::prepInputs(
62+
reproducible::preProcess(
6363
destinationPath = srcInfo$destinationPath,
6464
url = srcUq[i,]$url,
6565
targetFile = srcUq[i,]$targetFile,
6666
filename1 = if (tools::file_ext(srcUq[i,]$url) == "zip" &
6767
tools::file_ext(srcUq[i,]$targetFile) != "zip") basename(srcUq[i,]$url),
6868
archive = if (tools::file_ext(srcUq[i,]$targetFile) %in% c("zip", "tar", "rar")) NA,
69+
mode = "wb",
6970
alsoExtract = "similar",
7071
fun = NA,
7172
useCache = FALSE,
72-
...) |> as.character()
73+
...
74+
)$targetFilePath
7375
})
7476

7577
# Read source

0 commit comments

Comments
 (0)