Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Adjusted snapshot_meta helper function to adjust check for presence of file extension in `files` argument. Fixes issue where periods in file name are mistaken for signifying file extension (r-lib#1579).
  • Loading branch information
aj-sykes92 committed May 15, 2024
1 parent f060cce commit b239e37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/snapshot-manage.R
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ snapshot_meta <- function(files = NULL, path = "tests/testthat") {
files <- files[!is_dir]

dirs <- substr(dirs, 1, nchar(dirs) - 1)
files <- ifelse(tools::file_ext(files) == "", paste0(files, ".md"), files)
files <- ifelse(grepl("\\.md$", files), files, paste0(files, ".md"))

out <- out[out$name %in% files | out$test %in% dirs, , drop = FALSE]
}
Expand Down

0 comments on commit b239e37

Please sign in to comment.