Skip to content
Snippets Groups Projects
Commit 857f4a11 authored by Andreas Gattringer's avatar Andreas Gattringer
Browse files

make filename of downloaded data independent of URL

parent 286a24c9
Branches
No related tags found
No related merge requests found
......@@ -37,7 +37,7 @@ download_cats_quickstart_data <- function(install.dir, redownload = F, reextract
newest_version <- data$newest$quickstart_data
newest_url <-
subset(data$quickstart_data, version == newest_version)$url
destination_file <- file.path(install.dir, basename(newest_url))
destination_file <- file.path(install.dir, sprintf("cats-quickstart-data-%s.zip", newest_version))
if (!file.exists(destination_file) || redownload == TRUE) {
print(sprintf("Downloading %s to %s", newest_url, destination_file))
timeout <- R.utils::getOption("timeout")
......@@ -100,7 +100,7 @@ download_cats_for_windows <- function(install.dir, redownload = F, reextract = F
newest_url <-
subset(data$windows_binaries, version == newest_version)$url
destination_file <- file.path(install.dir, basename(newest_url))
destination_file <- file.path(install.dir, sprintf("cats-%s-windows.zip", newest_version))
if (!file.exists(destination_file) || redownload == TRUE) {
print(sprintf("Downloading %s to %s", newest_url, destination_file))
timeout <- R.utils::getOption("timeout")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment