Skip to content

Commit

Permalink
Merge pull request #1 from sarutak/SPARK-6568-2
Browse files Browse the repository at this point in the history
Fix the class path handling logic for the case that the path includes white space(%20)
  • Loading branch information
tsudukim committed Apr 10, 2015
2 parents 7019a8a + 45946ee commit 2c62e3b
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,8 @@ class SparkILoop(
// e.g. file:/C:/my/path.jar -> C:/my/path.jar
SparkILoop.getAddedJars.map { jar => new URI(jar).getPath.stripPrefix("/") }
} else {
SparkILoop.getAddedJars
// We need new URI(jar).getPath here for the case that `jar` includes encoded white space (%20).
SparkILoop.getAddedJars.map { jar => new URI(jar).getPath}
}
// work around for Scala bug
val totalClassPath = addedJars.foldLeft(
Expand Down Expand Up @@ -1109,7 +1110,7 @@ object SparkILoop extends Logging {
if (settings.classpath.isDefault)
settings.classpath.value = sys.props("java.class.path")

getAddedJars.foreach(settings.classpath.append(_))
getAddedJars.map(jar => new URI(jar).getPath).foreach(settings.classpath.append(_))

repl process settings
}
Expand Down

0 comments on commit 2c62e3b

Please sign in to comment.