From a2bbf741adf88b154deae21cc7c1561e204d7376 Mon Sep 17 00:00:00 2001 From: Mark Harrah Date: Wed, 16 Mar 2011 22:17:09 -0400 Subject: [PATCH] fix exception swallowing in IO.archive --- util/io/IO.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util/io/IO.scala b/util/io/IO.scala index 51c31b7f0..f0eb79757 100644 --- a/util/io/IO.scala +++ b/util/io/IO.scala @@ -309,7 +309,8 @@ object IO private def writeZip(sources: Seq[(File,String)], output: ZipOutputStream)(createEntry: String => ZipEntry) { import Path.{lazyPathFinder => pf} - val files = sources.collect { case (file,name) if file.isFile => (file, normalizeName(name)) } + val files = sources.flatMap { case (file,name) => if (file.isFile) (file, normalizeName(name)) :: Nil else Nil } + val now = System.currentTimeMillis // The CRC32 for an empty value, needed to store directories in zip files val emptyCRC = new CRC32().getValue() @@ -396,7 +397,6 @@ object IO case None => (new ZipOutputStream(fileOut), "zip") } try { f(zipOut) } - catch { case e: Exception => "Error writing " + ext + ": " + e.toString } finally { zipOut.close } } }