Skip to content

Commit

Permalink
fix: pass fileext not filetype to str_add_fileext
Browse files Browse the repository at this point in the history
- fix: pass fileext not filetype to str_add_fileext
  • Loading branch information
elipousson committed Mar 24, 2023
1 parent a2b9d47 commit 73ac3bf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions R/read_sf_ext.R
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,12 @@ modify_fn_fmls <- function(params,
read_sf_pkg <- function(data,
bbox = NULL,
package = NULL,
pkg = NULL,
fileext = "gpkg",
filetype = NULL,
...) {
fileext <- fileext %||% filetype
package <- package %||% pkg
check_string(package, allow_empty = FALSE)
rlang::check_installed(package)
check_string(
Expand All @@ -177,8 +179,7 @@ read_sf_pkg <- function(data,
return(use_eval_parse(data = data, package = package))
}

# FIXME: This triggers an alert with lintr but works fine
filename <- str_add_fileext(data, fileext = filetype)
filename <- str_add_fileext(data, fileext = fileext)

path <-
dplyr::case_when(
Expand Down

0 comments on commit 73ac3bf

Please sign in to comment.