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 1
1
2
2
# 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 !!
4
4
asBuildPath <- function (path ) {
5
5
6
- if (! is_windows())
7
- return (shQuote(path ))
8
-
9
6
# normalize paths using forward slashes
10
7
path <- normalizePath(path , winslash = " /" , mustWork = FALSE )
11
8
12
9
# prefer short path names if the path has spaces
13
- if (grepl(" " , path , fixed = TRUE ))
10
+ if (is_windows() && grepl(" " , path , fixed = TRUE ))
14
11
path <- utils :: shortPathName(path )
15
12
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
+
16
17
# return path
17
18
return (path )
18
19
You can’t perform that action at this time.
0 commit comments