You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some functions (e.g. path_tidy) call enc2utf8(as.character(path)), but others do not coerce to character first (e.g. path_expand just calls enc2utf8(path)). This leads to inconsistent treatment of non-character path inputs between different functions:
> fs::path_tidy(NA)
NA
> fs::path_expand(NA)
Error in enc2utf8(path) : argument is not a character vector
and also logically-inconsistent behaviour in some cases:
> fs::file_exists(NA_character_)
<NA>
FALSE
but
> fs::file_exists(NA)
Error in enc2utf8(path) : argument is not a character vector
If this isn't intentional, would it be unreasonable to apply an as.character coercion to all calls to enc2utf8 to avoid these errors?
The text was updated successfully, but these errors were encountered:
Some functions (e.g.
path_tidy
) callenc2utf8(as.character(path))
, but others do not coerce to character first (e.g.path_expand
just callsenc2utf8(path)
). This leads to inconsistent treatment of non-character path inputs between different functions:and also logically-inconsistent behaviour in some cases:
but
If this isn't intentional, would it be unreasonable to apply an
as.character
coercion to all calls toenc2utf8
to avoid these errors?The text was updated successfully, but these errors were encountered: