From 2566a38c2e8fd935ef821a2864dd519d72fc25c9 Mon Sep 17 00:00:00 2001 From: brodieG Date: Sat, 20 Jan 2024 11:31:17 -0500 Subject: [PATCH] use shortPathName on windows for headers --- R/compile.R | 2 ++ 1 file changed, 2 insertions(+) diff --git a/R/compile.R b/R/compile.R index ee20148..8312a86 100644 --- a/R/compile.R +++ b/R/compile.R @@ -731,6 +731,8 @@ r2c_local_headers <- function(name) { if(!name %in% list.files(system.file(package='r2c', 'headers'))) stop("Header not found: ", system.file(package='r2c', 'headers', name)) header.path <- system.file(package='r2c', 'headers', name) + # Try to deal with spaces in header path for windows + if(.Platform$OS.type == "windows") header.path <- shortPathName(header.path) if(grepl(">", header.path)) stop( "Header path contains '>' character which is disallowed. You might ",