From 1866f8573620c49200c57b81761638602e1f916d Mon Sep 17 00:00:00 2001 From: Andrew Or Date: Fri, 16 May 2014 15:47:14 -0700 Subject: [PATCH] Windows is not cooperating Splitting a string on java.io.File.separator on Windows (i.e. "\") fails with a PatternSyntaxException. --- core/src/main/scala/org/apache/spark/util/Utils.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/scala/org/apache/spark/util/Utils.scala b/core/src/main/scala/org/apache/spark/util/Utils.scala index 388f7222428db..0c7cff019fce1 100644 --- a/core/src/main/scala/org/apache/spark/util/Utils.scala +++ b/core/src/main/scala/org/apache/spark/util/Utils.scala @@ -1101,7 +1101,7 @@ private[spark] object Utils extends Logging { * Strip the directory from a path name */ def stripDirectory(path: String): String = { - path.split(File.separator).last + new File(path).getName } /**