Bioconductor/BiocFileCache

Failure to query bfc using url containing special characters

Closed this issue · 1 comments

I think this might have something to do with escaping special characters. It feels like the query string might be being parse as a regular expression?

bfc <- BiocFileCache(tempdir(), ask = FALSE)
url <- "https://zenodo.org/records/12747551/files/input.tar.gz?download=1"
input_path <- bfcadd(bfc, "input", fpath=url)

bfcquery(bfc, url)
># A tibble: 0 × 10
># ℹ 10 variables: rid <chr>, rname <chr>, create_time <dbl>, access_time <dbl>, rpath <chr>, rtype <chr>, fpath <chr>,
>#   last_modified_time <dbl>, etag <chr>, expires <dbl>

bfcquery(bfc, "https://zenodo.org/records/12747551/files/input.tar.gz")
># A tibble: 2 × 10
>  rid   rname create_time         access_time         rpath                                        rtype fpath last_modified_time etag  expires
>  <chr> <chr> <chr>               <chr>               <chr>                                        <chr> <chr> <chr>              <chr>   <dbl>
>1 BFC1  input 2024-08-29 03:29:46 2024-08-29 03:32:26 /Users/su.s/Library/Caches/org.R-project.R/web   http2024-07-17 >03:58:NA         NA

Solved by using exact = TRUE