Skip to content

Commit

Permalink
Fix cache_prune() and friends for board_url() (#734)
Browse files Browse the repository at this point in the history
* Recurse just a little, to find all possible pin versions

* Update NEWS
  • Loading branch information
juliasilge authored Apr 19, 2023
1 parent 79226cb commit 02483d0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
* Added new `headers` argument for `board_url()`, mostly for authentication, as
well as new board for Connect vanity URLs `board_connect_url()` (#732).

* Fixed bug in `cache_prune()` to correctly find caches for `board_url()` (#734).

# pins 1.1.0

## Breaking changes
Expand Down
4 changes: 1 addition & 3 deletions R/cache.R
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,7 @@ cache_boards <- function() {
}

cache_versions <- function() {
pins <- fs::dir_ls(cache_boards(), type = "directory")
versions <- fs::dir_ls(pins, type = "directory")

versions <- fs::dir_ls(cache_boards(), recurse = 2, type = "directory")
versions[fs::file_exists(fs::path(versions, "data.txt"))]
}

Expand Down

0 comments on commit 02483d0

Please sign in to comment.