Skip to content

Commit add97f5

Browse files
committed
Use URL encode to create valid URIs for jars
1 parent 73430c6 commit add97f5

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

pkg/R/sparkR.R

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,7 @@ sparkR.init <- function(
131131
}
132132

133133
nonEmptyJars <- Filter(function(x) { x != "" }, jars)
134-
# URIs don't work very well on Windows, so just use paths.
135-
localJarPaths <- if (.Platform$OS.type == "unix") {
136-
sapply(nonEmptyJars, function(j) { paste("file://", j, sep = "") })
137-
} else {
138-
nonEmptyJars
139-
}
134+
localJarPaths <- sapply(nonEmptyJars, function(j) { utils::URLencode(paste("file://", j, sep = "")) })
140135

141136
assign(
142137
".sparkRjsc",

0 commit comments

Comments
 (0)