diff --git a/R/file_analysis.R b/R/file_analysis.R index b1fc579..745ab58 100644 --- a/R/file_analysis.R +++ b/R/file_analysis.R @@ -24,7 +24,6 @@ request_file_analysis <- function(con, if (!rlang::is_missing(filepath)) { stopifnot(is.character(filepath) || is.vector(filepath)) filepath <- normalizePath(filepath, mustWork = FALSE) - filetoken <- get_filetoken(filepath) request <- list( type = "request-file-analysis", id = id, diff --git a/R/utils.R b/R/utils.R index 2b104cb..d40d5e8 100644 --- a/R/utils.R +++ b/R/utils.R @@ -19,7 +19,7 @@ get_filetoken <- function(filepath = rlang::missing_arg(), content = rlang::miss if (!rlang::is_missing(filepath)) { stopifnot(is.character(filepath) || is.vector(filepath)) # sort to ensure that a different order will result in the same token - filepath <- sort(c(filepath)) + filepath <- sort(lapply(c(filepath), normalizePath) |> unlist()) stopifnot(file.exists(filepath)) token <- digest::digest(lapply(filepath, readLines)) } else if (!rlang::is_missing(content)) {