Permalink
Browse files

closes #75: java.util.regex.PatternSyntaxException on Windows

  • Loading branch information...
1 parent ea821f1 commit b13627ab126652b6fdd8383c437543f77183a867 Heiko Seeberger committed Jan 6, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 sbteclipse-core/src/main/scala/com/typesafe/sbteclipse/core/Eclipse.scala
@@ -61,6 +61,8 @@ private object Eclipse {
val FileSep = System.getProperty("file.separator")
+ val FileSepPattern = FileSep.replaceAll("""\\""", """\\\\""")
+
def eclipseCommand(commandName: String) =
Command(commandName)(_ => parser)((state, args) => action(args.toMap)(state))
@@ -194,7 +196,7 @@ private object Eclipse {
if (buildDirectory == baseDirectory) Some(".") else IO.relativize(buildDirectory, baseDirectory)
val relativizedFile = IO.relativize(buildDirectory, file)
val relativized = (relativizedBase |@| relativizedFile)((base, file) =>
- "%s/%s".format(base split FileSep map (part => if (part != ".") ".." else part) mkString FileSep, file)
+ "%s/%s".format(base split FileSepPattern map (part => if (part != ".") ".." else part) mkString FileSep, file)
)
relativized getOrElse file.getAbsolutePath
}

0 comments on commit b13627a

Please sign in to comment.