Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Null-check the result of File.listFiles
  • Loading branch information
laurilehmijoki committed Feb 3, 2015
1 parent f688d38 commit 25fb7ce
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/scala/s3/website/model/push.scala
Expand Up @@ -128,7 +128,10 @@ object Upload {
object Files {
def recursiveListFiles(f: File): Seq[File] = {
val these = f.listFiles
these ++ these.filter(_.isDirectory).flatMap(recursiveListFiles)
if (these != null)
these ++ these.filter(_.isDirectory).flatMap(recursiveListFiles)
else
Nil
}

def listSiteFiles(implicit site: Site, logger: Logger) = {
Expand Down

0 comments on commit 25fb7ce

Please sign in to comment.