From df1cdb7197a74cad49f475b19a990c4690b29eaf Mon Sep 17 00:00:00 2001 From: Andreas Gattringer <andreas.gattringer@univie.ac.at> Date: Tue, 30 May 2023 16:20:12 +0200 Subject: [PATCH] hardcode 'wb' mode for zip file downloads --- R/cats_download_helper.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/cats_download_helper.R b/R/cats_download_helper.R index 6f65da0..bcda293 100644 --- a/R/cats_download_helper.R +++ b/R/cats_download_helper.R @@ -43,7 +43,7 @@ download_cats_quickstart_data <- function(install.dir, redownload = F, reextract timeout <- R.utils::getOption("timeout") R.utils::setOption("timeout", 3600) result <- - utils::download.file(newest_url, destfile = destination_file) + utils::download.file(newest_url, destfile = destination_file, mode="wb") R.utils::setOption("timeout", timeout) if (result != 0) { @@ -105,7 +105,7 @@ download_cats_for_windows <- function(install.dir, redownload = F, reextract = F print(sprintf("Downloading %s to %s", newest_url, destination_file)) timeout <- R.utils::getOption("timeout") result <- - utils::download.file(newest_url, destfile = destination_file) + utils::download.file(newest_url, destfile = destination_file, mode="wb") R.utils::setOption("timeout", timeout) if (result != 0) { stop("Error downloading CATS") -- GitLab