Skip to content

Commit

Permalink
fixes trade regions bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
adamhsparks committed Nov 19, 2024
1 parent 29ee5f0 commit 399e3ce
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions R/get_abares_trade_regions.R
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ get_abares_trade_regions <- function(cache = TRUE) {
.check_existing_trade_regions <- function(cache) {
abares_trade_rds <- file.path(.find_user_cache(),
"abares_trade_dir/abares_trade_regions.rds")
tmp_csv <- file.path(tempdir(), "abares_trade.csv")
tmp_csv <- file.path(tempdir(), "abares_trade_regions.csv")

if (file.exists(abares_trade_rds)) {
return(readRDS(abares_trade_rds))
Expand Down Expand Up @@ -105,9 +105,7 @@ get_abares_trade_regions <- function(cache = TRUE) {

if (cache) {
saveRDS(abares_trade_regions, file = abares_trade_regions_rds)
unlink(c(
file.path(tmp_csv)
))
unlink(tmp_csv)
}
return(abares_trade_regions[])
}

0 comments on commit 399e3ce

Please sign in to comment.