From 407dba3a866755e9b669fb27962daf6f091451c3 Mon Sep 17 00:00:00 2001 From: Jeroen Ooms Date: Sat, 20 Jul 2024 12:32:56 +0200 Subject: [PATCH] Do not show message if GS is installed on Windows See #398 --- R/edit.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/edit.R b/R/edit.R index e95c7a2..b658a78 100644 --- a/R/edit.R +++ b/R/edit.R @@ -65,7 +65,7 @@ image_read <- function(path, density = NULL, depth = NULL, strip = FALSE, coales density <- as.character(density) depth <- as.integer(depth) defines <- validate_defines(defines) - if(is.character(path) && grepl("\\.pdf$", path) && Sys.which('gs') == ""){ + if(is.character(path) && grepl("\\.pdf$", path) && Sys.which('gs') == "" && !file.exists('C:\\Program Files\\gs')){ message("Ghostscript (gs) not found on the PATH.\nTry image_read_pdf() to read PDF using pdftools instead.") } image <- if(isS4(path) && methods::is(path, "Image")){