Skip to content

Commit

Permalink
call normalize path before shell.exec on windows (unc path compatabil…
Browse files Browse the repository at this point in the history
…ity)
  • Loading branch information
jjallaire committed Feb 17, 2012
1 parent 832fa6e commit 2796d02
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/cpp/r/R/Tools.R
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,10 @@ assign( envir = .rs.Env, ".rs.setVar", function(name, var)
.rs.addFunction( "shellViewPdf", function(path)
{
if(.Platform$OS.type == "windows")
shell.exec(path)
{
require(utils, quietly=TRUE)
shell.exec(normalizePath(path))
}
else if (identical(substr(.Platform$pkgType, 1L, 10L), "mac.binary"))
system(paste("open", "-a", "Preview", shQuote(path)), wait = FALSE)
else
Expand Down

0 comments on commit 2796d02

Please sign in to comment.