Permalink
Browse files

fix for issue #5

  • Loading branch information...
rajeshpg committed Nov 24, 2011
1 parent 10f1b56 commit aaa0a34cead26f0230bb63d4d57ca6686205b88d
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 aaa0a34

Please sign in to comment.