File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -21,16 +21,11 @@ Rcpp.system.file <- function(...){
21
21
}
22
22
23
23
# # quote path if non-standard characters are used
24
- Rcpp.quoteNonStandard <- function (path , quoteAll = .Platform $ OS.type != " unix" ) {
25
- quoted <- shQuote(path )
26
- if (quoteAll ) {
27
- quoted
28
- } else {
29
- # Select paths in which all characters do not need quoting
30
- sel <- grepl(" ^[[:alnum:]/._~+@%-]*$" , path )
31
- # Quote remaining paths
32
- ifelse(sel , path , quoted )
33
- }
24
+ Rcpp.quoteNonStandard <- function (path ) {
25
+ # # On unix, check if path has only characters that do not need quoting
26
+ noquote <- .Platform $ OS.type == " unix" && grepl(" ^[[:alnum:]/._~+@%-]*$" , path )
27
+ # # If no quoting needed return unchanged else quote input
28
+ if (noquote ) path else shQuote(path )
34
29
}
35
30
36
31
# # Use R's internal knowledge of path settings to find the lib/ directory
You can’t perform that action at this time.
0 commit comments