From fd56f1cff2c0d298b1afa0be75ca05acc8c61095 Mon Sep 17 00:00:00 2001 From: eblondel Date: Tue, 1 Sep 2020 17:26:19 +0200 Subject: [PATCH] #31 rename in case of slashes in zenodo record filename --- R/ZenodoRecord.R | 2 ++ 1 file changed, 2 insertions(+) diff --git a/R/ZenodoRecord.R b/R/ZenodoRecord.R index 085729a..0557e70 100644 --- a/R/ZenodoRecord.R +++ b/R/ZenodoRecord.R @@ -1162,6 +1162,7 @@ ZenodoRecord <- R6Class("ZenodoRecord", #download_file util download_file <- function(file){ + file$filename <- gsub("/", "_", file$filename) if (!quiet) cat(sprintf("[zen4R][INFO] Downloading file '%s' - size: %s\n", file$filename, file$filesize %>% human_filesize())) target_file <-file.path(path, file$filename) @@ -1170,6 +1171,7 @@ ZenodoRecord <- R6Class("ZenodoRecord", } #check_integrity util check_integrity <- function(file){ + file$filename <- gsub("/", "_", file$filename) target_file <-file.path(path, file$filename) #check md5sum target_file_md5sum <- tools::md5sum(target_file)