Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #17 from melezov/path-separator-patch

Fixed problems on Windows system which do not use the / path separator.
  • Loading branch information...
commit 248decb8216036b759220616c2a7999ac11f8ac3 2 parents 5bd8e04 + a6f8b10
@softprops authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/main/scala/less.scala
View
6 src/main/scala/less.scala
@@ -20,8 +20,8 @@ object Plugin extends sbt.Plugin {
class LessSourceFile(val lessFile: File, sourcesDir: File, targetDir: File, cssDir: File) {
val relPath = IO.relativize(sourcesDir, lessFile).get
- lazy val cssFile = new File(cssDir, relPath.replace(".less",".css"))
- lazy val importsFile = new File(targetDir, relPath + ".imports");
+ lazy val cssFile = new File(cssDir, relPath.replaceFirst("\\.less$",".css"))
+ lazy val importsFile = new File(targetDir, relPath + ".imports")
lazy val parentDir = lessFile.getParentFile
def imports = IO.read(importsFile).split(ImportsDelimiter).collect {
@@ -29,7 +29,7 @@ object Plugin extends sbt.Plugin {
}
def changed = !importsFile.exists || (lessFile newerThan cssFile) || (imports exists (_ newerThan cssFile))
- def path = lessFile.getPath
+ def path = lessFile.getPath.replace('\\', '/')
override def toString = lessFile.toString
}
Please sign in to comment.
Something went wrong with that request. Please try again.