diff --git a/NEWS.md b/NEWS.md index d694fa08..ed886dfc 100644 --- a/NEWS.md +++ b/NEWS.md @@ -16,6 +16,7 @@ BUGFIXES : * `setSimulationPathAPI()`: control the existence of the output folder **links** or **areas** before reading the data (upgrade Antares Web) * `readClusterDesc()` / `readClusterResDesc()` / `readClusterSTDesc()` return a data.table in API mode +* `setSimulationPathAPI()` : encode URL before reading the data in simulation mode # antaresRead 2.7.1 diff --git a/R/setSimulationPathAPI.R b/R/setSimulationPathAPI.R index 274aa316..0613431f 100644 --- a/R/setSimulationPathAPI.R +++ b/R/setSimulationPathAPI.R @@ -496,7 +496,9 @@ setSimulationPathAPI <- function(host, study_id, token, simulation = NULL, if (type == "links") { path_element <- gsub(pattern = " - ", replacement = "/", x = path_element) } + path_element <- URLencode(path_element, reserved = TRUE) d <- file.path(path, type, path_element) + d <- URLencode(d) f <- names(read_secure_json(paste0(d, "&depth=1"), ...)) f <- f[grep("values", f)] if (length(f) > 0) {