Skip to content

Commit

Permalink
Clean up unused gbif directory
Browse files Browse the repository at this point in the history
  • Loading branch information
stitam committed May 29, 2024
1 parent 0ddc649 commit a34893e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions R/db_download.R
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,7 @@ db_download_gbif <- function(verbose = TRUE, overwrite = FALSE) {
db_url <- "https://hosted-datasets.gbif.org/datasets/backbone/current/backbone.zip"
db_path <- file.path(tdb_cache$cache_path_get(), 'gbif.sqlite')
db_path_file <- file.path(tdb_cache$cache_path_get(), 'backbone.zip')
db_path_dir <- file.path(tdb_cache$cache_path_get(), 'gbif')

assert(verbose, "logical")
assert(overwrite, "logical")
Expand Down Expand Up @@ -452,6 +453,7 @@ db_download_gbif <- function(verbose = TRUE, overwrite = FALSE) {

mssg(verbose, 'cleaning up...')
unlink(db_path_file)
unlink(db_path_dir, recursive = TRUE)

mssg(verbose, 'all done...')
return(db_path)
Expand Down

0 comments on commit a34893e

Please sign in to comment.