File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 11
22# generate paths consumable by the compilers and linkers
3- # in particular, on Windows, this means the path _cannot_ be quoted !!
3+ # in particular, on Windows and Solaris , this means the path _cannot_ be quoted !!
44asBuildPath <- function (path ) {
55
6- if (! is_windows())
7- return (shQuote(path ))
8-
96 # normalize paths using forward slashes
107 path <- normalizePath(path , winslash = " /" , mustWork = FALSE )
118
129 # prefer short path names if the path has spaces
13- if (grepl(" " , path , fixed = TRUE ))
10+ if (is_windows() && grepl(" " , path , fixed = TRUE ))
1411 path <- utils :: shortPathName(path )
1512
13+ # if we still have spaces, and we're not Windows or Solaris, try quoting
14+ if (grepl(" " , path , fixed = TRUE ) && ! is_windows() && ! is_solaris())
15+ path <- shQuote(path )
16+
1617 # return path
1718 return (path )
1819
You can’t perform that action at this time.
0 commit comments