Skip to content

Commit 1c5b98d

Browse files
committed
Strip URL parameters for local filename
1 parent 4001fd7 commit 1c5b98d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/library/utils/R/packages.R

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,9 @@ download.packages <- function(pkgs, destdir, available = NULL,
853853
domain = NA, immediate. = TRUE)
854854
} else {
855855
url <- paste(repos, fn, sep = "/")
856-
destfile <- file.path(destdir, fn)
856+
857+
# Strip URL parameters for local filename: pkg_1.0.tar.gz?somekey=12345
858+
destfile <- file.path(destdir, sub("\\?.*$", "", fn))
857859

858860
if (is.null(bulkdown)) {
859861
# serial download

0 commit comments

Comments
 (0)