Skip to content

Commit d594e16

Browse files
committed
Update SparkContext.scala
1 parent 0ff3fa8 commit d594e16

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/main/scala/org/apache/spark/SparkContext.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1093,7 +1093,7 @@ class SparkContext(config: SparkConf) extends Logging with ExecutorAllocationCli
10931093
def addFile(path: String, recursive: Boolean): Unit = {
10941094
val uri = new URI(path)
10951095
val schemeCorrectedPath = uri.getScheme match {
1096-
case null | "local" => "file:" + new File(path).getCanonicalPath
1096+
case null | "local" => new File(path).getCanonicalFile.toURI.toString
10971097
case _ => path
10981098
}
10991099

0 commit comments

Comments
 (0)