Permalink
Browse files

Merge pull request #6 from rajeshpg/master

fix for issue #5
  • Loading branch information...
mads-hartmann committed Nov 24, 2011
2 parents 10f1b56 + aaa0a34 commit 0afd6d088b3120f2e395b07f5b76cbd9a2ddf472
Showing with 6 additions and 1 deletion.
  1. +6 −1 lifty-engine/src/main/scala/org/lifty/engine/io/FileUtil.scala
@@ -72,7 +72,12 @@ object FileUtil {
if (file.isDirectory) {
file.mkdirs()
} else {
val parentPath = file.getAbsolutePath.split(File.separator).init.mkString(File.separator)
val parentPath = File.separator match {
case "\\" => (file.getAbsolutePath.split("\\\\").init.mkString("\\\\")) // for windows
case _ => (file.getAbsolutePath.split(File.separator).init.mkString(File.separator)) // for linux and others
}
new File(parentPath).mkdirs()
file.createNewFile()
}

0 comments on commit 0afd6d0

Please sign in to comment.