diff --git a/DESCRIPTION b/DESCRIPTION index dcc4942..2b54df5 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -14,7 +14,7 @@ Description: MIME types are shorthand descriptors for perform curated "magic" tests as well as mapping MIME types from a database of over 1,800 extension mappings. -URL: http://gitlab.com/hrbrmstr/wand +URL: https://gitlab.com/hrbrmstr/wand BugReports: https://gitlab.com/hrbrmstr/wand/issues Encoding: UTF-8 License: MIT + file LICENSE diff --git a/R/get-content-type.R b/R/get-content-type.R index f154cf3..262e56f 100644 --- a/R/get-content-type.R +++ b/R/get-content-type.R @@ -17,7 +17,7 @@ #' get_content_type(system.file("extdat", "test.pdf", package="wand")) get_content_type <- function(path, ...) { - path <- path.expand(path) + path <- path.expand(path[1]) if (!file.exists(path)) stop("File not found.", call.=FALSE) hdr <- readBin(path, "raw", n=1024) diff --git a/R/guess-content-type.R b/R/guess-content-type.R index 04bcb94..4381cd3 100644 --- a/R/guess-content-type.R +++ b/R/guess-content-type.R @@ -19,7 +19,7 @@ #' guess_content_type(system.file("extdat", "test.pdf", package="wand")) guess_content_type <- function(path, not_found = "???", custom_db = NULL) { - path <- path.expand(path) + path <- path.expand(path[1]) if (!file.exists(path)) stop("File not found.", call.=FALSE) if (is.null(custom_db)) {