diff --git a/base/db/R/check.missing.files.R b/base/db/R/check.missing.files.R index 617878496d..29ce044f68 100644 --- a/base/db/R/check.missing.files.R +++ b/base/db/R/check.missing.files.R @@ -8,7 +8,7 @@ #' #' @author Betsy Cowdery, Michael Dietze, Ankur Desai, Tony Gardella, Luke Dramko -check_missing_files <- function(result, outname, existing.input = NULL, existing.dbfile = NULL) { +check_missing_files <- function(result, existing.input = NULL, existing.dbfile = NULL) { result_sizes <- purrr::map_dfr( result, ~ dplyr::mutate( @@ -35,12 +35,12 @@ check_missing_files <- function(result, outname, existing.input = NULL, existing } - # Wrap in a list for consistant processing later - if (exists("existing.input") && is.data.frame(existing.input)) { + # Wrap in a list for consistent processing later + if (is.data.frame(existing.input)) { existing.input <- list(existing.input) } - if (exists("existing.dbfile") && is.data.frame(existing.dbfile)) { + if (is.data.frame(existing.dbfile)) { existing.dbfile <- list(existing.dbfile) } return(list(existing.input, existing.dbfile)) diff --git a/base/db/R/convert_input.R b/base/db/R/convert_input.R index ed267440fb..a074a68938 100644 --- a/base/db/R/convert_input.R +++ b/base/db/R/convert_input.R @@ -583,7 +583,7 @@ convert_input <- #--------------------------------------------------------------------------------------------------# # Check if result has empty or missing files - checked.missing.files <- check_missing_files(result, outname, existing.input, existing.dbfile) + checked.missing.files <- check_missing_files(result, existing.input, existing.dbfile) # Unwrap parameters after performing checks for missing files existing.input <- checked.missing.files$existing.input diff --git a/base/db/tests/testthat/test.check.missing.files.R b/base/db/tests/testthat/test.check.missing.files.R index c0ad6794f6..bc61bb1ad4 100644 --- a/base/db/tests/testthat/test.check.missing.files.R +++ b/base/db/tests/testthat/test.check.missing.files.R @@ -5,7 +5,6 @@ test_that("`check_missing_files()` able to return correct missing files", { res <- check_missing_files( result = list(data.frame(file = c("A", "B"))), - outname = "test", existing.input = data.frame(), existing.dbfile = data.frame() )