Skip to content

Commit

Permalink
#31 rename in case of slashes in zenodo record filename
Browse files Browse the repository at this point in the history
  • Loading branch information
eblondel committed Sep 1, 2020
1 parent e608670 commit fd56f1c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions R/ZenodoRecord.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit fd56f1c

Please sign in to comment.