Skip to content

Commit

Permalink
Fixed escaping of file separator on windows when relativeSourceMaps i…
Browse files Browse the repository at this point in the history
…s enabled
  • Loading branch information
DylanArnold committed Jan 29, 2014
1 parent 7c44f71 commit 4921dbb
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import sbt._
import scala.annotation.tailrec

import java.io.PrintWriter
import java.util.regex.Pattern

import com.google.debugging.sourcemap.{ FilePosition, _ }

Expand Down Expand Up @@ -111,7 +112,7 @@ object SourceMapCat {
import java.io.File

def getPathSegments(path: String) =
path.split(File.separator).toList.filter(_.length > 0).filter(_ != ".")
path.split(Pattern.quote(File.separator)).toList.filter(_.length > 0).filter(_ != ".")
.foldLeft(List[String]()) { (p, s) => if (s == "..") p.tail else s :: p }
.reverse

Expand Down

0 comments on commit 4921dbb

Please sign in to comment.