Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added support for windows systems

  • Loading branch information...
commit bbc31589e2fea785d74ae69611d0bb310cec0c78 1 parent 11531f2
Dan Simpson authored June 23, 2011
3  core/src/main/scala/org/ds/satchel/Satchel.scala
@@ -267,13 +267,12 @@ class Satchel(val name: String,
267 267
    * Strip the root from the file path
268 268
    */
269 269
   private def filename(path: String): String = {
270  
-    path.replaceFirst(root, "")
  270
+    path.replace('\\','/').replaceFirst(root, "")
271 271
   }
272 272
 
273 273
   private def glob(patterns: List[String]): List[String] = {
274 274
     patterns.map { pattern: String =>
275 275
       FileUtil.eglob(root + "/" + pattern)
276  
-      //util.eglob(root + "/" + pattern)
277 276
     }.flatten.removeDuplicates
278 277
   }
279 278
   
2  core/src/main/scala/org/ds/satchel/processors/JstProcessor.scala
@@ -33,7 +33,7 @@ class JstProcessor extends SatchelProcessor {
33 33
   	}
34 34
   	
35 35
   	override def process(path:String, content:String):String = {
36  
-  	  "JST[\"" + path + "\"] = \"" + clean(content) + "\";";
  36
+  	  "JST[\"" + path.replace('\\','/') + "\"] = \"" + clean(content) + "\";";
37 37
   	}
38 38
   	
39 39
   	private def clean(content:String) = {
2  core/src/main/scala/org/ds/satchel/util/FileUtil.scala
@@ -35,7 +35,7 @@ object FileUtil {
35 35
     val result = new RichFile(new File(root)).tree.map(_.toString)
36 36
     
37 37
     result.filter { p =>
38  
-      val itr = regex.findAllIn(p)
  38
+      val itr = regex.findAllIn(p.replace('\\','/'))
39 39
       itr.size > 0
40 40
     }.toList.reverse
41 41
   }

0 notes on commit bbc3158

Please sign in to comment.
Something went wrong with that request. Please try again.