Skip to content

Commit

Permalink
use shortPathName on windows for headers
Browse files Browse the repository at this point in the history
  • Loading branch information
brodieG committed Jan 20, 2024
1 parent f43ac63 commit 2566a38
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions R/compile.R
Original file line number Diff line number Diff line change
Expand Up @@ -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 ",
Expand Down

0 comments on commit 2566a38

Please sign in to comment.