Skip to content

Commit

Permalink
strip embedded quotes from Copernicus etags v0.14.2
Browse files Browse the repository at this point in the history
  • Loading branch information
raymondben committed Feb 5, 2024
1 parent ef8fb04 commit e903338
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: bowerbird
Type: Package
Title: Keep a Collection of Sparkly Data Resources
Version: 0.14.1
Version: 0.14.2
Authors@R: c(person("Ben", "Raymond", email = "ben.raymond@aad.gov.au", role = c("aut", "cre")),
person("Michael", "Sumner", role = "aut"),
person("Miles", "McBain", email = "miles.mcbain@gmail.com", role = c("rev", "ctb")),
Expand Down
1 change: 1 addition & 0 deletions R/copernicus_handler.R
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ bb_handler_copernicus_inner <- function(config, verbose = FALSE, local_dir_only
myfiles <- if (ctype == "file") cms_list_stac_single_file(product) else CopernicusMarine::cms_list_stac_files(product) ## layer is ignored in this?
if (nrow(myfiles) < 1) stop("No files found for Copernicus Marine product: ", product)
if (!all(c("home", "native", "current_path", "ETag") %in% names(myfiles))) stop("file list does not have the expected columns, has there been a change to the format returned by `CopernicusMarine::cms_list_stac_files()`?")
myfiles$ETag <- sub("^\"", "", sub("\"$", "", myfiles$ETag))
if (!"url" %in% names(myfiles)) myfiles$url <- paste0("https://", file.path(myfiles$home, myfiles$native, myfiles$current_path))
## take the `current_path` of each file and find the product ID
pidx <- stringr::str_locate(myfiles$current_path, stringr::fixed(paste0(product, "/")))
Expand Down

0 comments on commit e903338

Please sign in to comment.