Skip to content

Commit

Permalink
handle zarr at a domain without context (#119)
Browse files Browse the repository at this point in the history
Co-authored-by: Mark Keller <[email protected]>
  • Loading branch information
dblodgett-usgs and keller-mark authored Dec 17, 2024
1 parent d299150 commit 8bd4e75
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion R/stores.R
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,10 @@ HttpStore <- R6::R6Class("HttpStore",

segments <- stringr::str_split(private$url, "/")[[1]]
private$domain <- paste(segments[1:3], collapse="/")
private$base_path <- paste(segments[4:length(segments)], collapse="/")
# Support both cases in which the store is located at the root
# of the domain, or located under some base_path.
private$base_path <- ifelse(length(segments) == 3, "",
paste(segments[4:length(segments)], collapse="/"))

if(!requireNamespace("crul", quietly = TRUE)) {
stop("HttpStore requires the crul package")
Expand Down

0 comments on commit 8bd4e75

Please sign in to comment.