Skip to content
This repository has been archived by the owner. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
download: use zip package to create archives. As the zip package is p…
…latform independent there is no longer the requirement to install Rtools on windows.
  • Loading branch information
HendrikSchultheis committed Oct 16, 2019
1 parent b315802 commit 48443ca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion DESCRIPTION
Expand Up @@ -46,7 +46,8 @@ Imports: shiny,
openssl,
methods,
R6,
magrittr
magrittr,
zip
RoxygenNote: 6.1.1
biocViews:
Suggests: knitr,
Expand Down
4 changes: 2 additions & 2 deletions R/function.R
Expand Up @@ -1207,7 +1207,7 @@ searchData <- function(input, choices, options = c("=", "<", ">"), min. = min(ch
#' @param save_plot Logical if plot object should be saved as .RData.
#' @param ui List of user inputs. Will be converted to JavaScript Object Notation. See \code{\link[RJSONIO]{toJSON}}
#'
#' @return See \code{\link[utils]{zip}}.
#' @return Path to zip archive. See \code{\link[zip]{zipr}}.
download <- function(file, filename, plot, width, height, ppi = 72, save_plot = TRUE, ui = NULL) {
session <- shiny::getDefaultReactiveDomain()

Expand Down Expand Up @@ -1289,7 +1289,7 @@ download <- function(file, filename, plot, width, height, ppi = 72, save_plot =
}

# create zip file
out <- utils::zip(zipfile = file, files = files, flags = "-j") # discard file path
out <- zip::zipr(zipfile = file, files = files, include_directories = FALSE)

# remove tmp files
file.remove(files)
Expand Down

0 comments on commit 48443ca

Please sign in to comment.