diff --git a/R/stores.R b/R/stores.R index 24a821d..13b7933 100644 --- a/R/stores.R +++ b/R/stores.R @@ -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")