Skip to content

Commit a6021c6

Browse files
committed
Encode the path before creating the download URL.
1 parent 2a621c2 commit a6021c6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: gobbler
2-
Version: 0.3.17
3-
Date: 2025-07-02
2+
Version: 0.3.18
3+
Date: 2025-08-18
44
Title: Interface to the gobbler service
55
Description:
66
Friendly interface to the gobbler service.

R/fetchDirectory.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ fetchDirectory <- function(path, registry, url, cache=NULL, forceRemote=FALSE, o
101101
final
102102
}
103103

104-
#' @importFrom utils download.file
104+
#' @importFrom utils download.file URLencode
105105
acquire_file_raw <- function(cache, path, url, overwrite) {
106106
target <- file.path(cache, "REGISTRY", path)
107107

@@ -111,7 +111,7 @@ acquire_file_raw <- function(cache, path, url, overwrite) {
111111
tempf <- tempfile(tmpdir=tempdir)
112112
on.exit(unlink(tempf), add=TRUE, after=FALSE)
113113

114-
if (download.file(paste0(url, "/fetch/", path), tempf)) {
114+
if (download.file(paste0(url, "/fetch/", URLencode(path, reserved=TRUE)), tempf)) {
115115
stop("failed to download '", path, "' from the registry")
116116
}
117117
dir.create(dirname(target), recursive=TRUE, showWarnings=FALSE)

0 commit comments

Comments
 (0)