Fix of KT-7130

This commit is contained in:
Mikhail Glukhikh
2015-03-27 08:43:46 +01:00
committed by Mikhail Glukhikh
parent 1e536af87e
commit 5d7e388276
2 changed files with 36 additions and 13 deletions
@@ -307,7 +307,7 @@ public fun File.copyRecursively(dst: File,
*
* @return true if the file or directory is successfully deleted, false otherwise.
*/
public fun File.deleteRecursively(): Boolean = walkBottomUp().fold(exists(), { res, it -> res && it.delete() })
public fun File.deleteRecursively(): Boolean = walkBottomUp().fold(exists(), { res, it -> it.delete() && res })
/**
* Returns an array of files and directories in the directory that match the specified [filter]