diff options
author | Christopher Vogt <oss.nsp@cvogt.org> | 2017-02-28 05:52:13 +0800 |
---|---|---|
committer | Christopher Vogt <oss.nsp@cvogt.org> | 2017-02-28 09:25:59 -0500 |
commit | 5e80b4f4ac84956c8274fc69c187f40b55dfc51e (patch) | |
tree | a7e719850cf4abc907fbfc76984005c701914afd /stage1 | |
parent | 734d2f801a47f272d79b99531815e19704146b37 (diff) | |
download | cbt-5e80b4f4ac84956c8274fc69c187f40b55dfc51e.tar.gz cbt-5e80b4f4ac84956c8274fc69c187f40b55dfc51e.tar.bz2 cbt-5e80b4f4ac84956c8274fc69c187f40b55dfc51e.zip |
simplify uberJar plugin and activate recursiveDelete lib function
Diffstat (limited to 'stage1')
-rw-r--r-- | stage1/cbt.scala | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/stage1/cbt.scala b/stage1/cbt.scala index bc0e944..44506d2 100644 --- a/stage1/cbt.scala +++ b/stage1/cbt.scala @@ -35,14 +35,13 @@ object `package`{ assert( file == file.getCanonicalFile, "deleteRecursive requires previous .getCanonicalFile" ) assert( file.isAbsolute, "deleteRecursive requires absolute path" ) assert( file.string != "", "deleteRecursive requires non-empty file path" ) - assert( s.split("/").size > 4, "deleteRecursive requires absolute path of at least depth 4" ) - assert( s.split("\\").size > 4, "deleteRecursive requires absolute path of at least depth 4" ) + assert( s.split(File.separator.replace("\\","\\\\")).size > 4, "deleteRecursive requires absolute path of at least depth 4" ) assert( !listRecursive.exists(_.isHidden), "deleteRecursive requires no files to be hidden" ) assert( listRecursive.forall(_.canWrite), "deleteRecursive requires all files to be writable" ) if( file.isDirectory ){ file.listFiles.map(_.deleteRecursive) } - //file.delete + file.delete } def listRecursive: Seq[File] = { |