Skip to content

Commit

Permalink
Encode url because of specific names of areas (ex: & psp x1)
Browse files Browse the repository at this point in the history
  • Loading branch information
kemihak committed Sep 27, 2024
1 parent e079e8b commit b3db580
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions R/setSimulationPathAPI.R
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit b3db580

Please sign in to comment.