aboutsummaryrefslogtreecommitdiff
path: root/stage2/Lib.scala
diff options
context:
space:
mode:
authorChristopher Vogt <oss.nsp@cvogt.org>2017-03-19 19:52:56 -0400
committerChristopher Vogt <oss.nsp@cvogt.org>2017-03-19 21:57:55 -0400
commit5388bb116834196e1b0a9bd9f2622f36e842b3be (patch)
tree468ba146c0417cca2b12d1924bcf84cabffc3646 /stage2/Lib.scala
parentbb409cc1701b83a3335902789cb4309b64d4e26e (diff)
downloadcbt-5388bb116834196e1b0a9bd9f2622f36e842b3be.tar.gz
cbt-5388bb116834196e1b0a9bd9f2622f36e842b3be.tar.bz2
cbt-5388bb116834196e1b0a9bd9f2622f36e842b3be.zip
better error than NullPointerException when directory does not exist
Diffstat (limited to 'stage2/Lib.scala')
-rw-r--r--stage2/Lib.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/stage2/Lib.scala b/stage2/Lib.scala
index bb59604..04e68f1 100644
--- a/stage2/Lib.scala
+++ b/stage2/Lib.scala
@@ -202,7 +202,7 @@ final class Lib(val logger: Logger) extends Stage1Lib(logger){
def depthFirstFileStream(file: File): Vector[File] = {
(
if (file.isDirectory) {
- file.listFiles.toVector.flatMap(depthFirstFileStream(_))
+ file.listOrFail.toVector.flatMap(depthFirstFileStream(_))
} else Vector()
) :+ file
}