mirror of https://github.com/sbt/sbt.git
Merge pull request #3134 from eed3si9n/wip/zipexception
[sbt 0.13] Ignore ZipException in cache
This commit is contained in:
commit
76fe21eb0c
|
|
@ -7,7 +7,7 @@ import Sxr.sxr
|
|||
// but can be shared across the multi projects.
|
||||
def buildLevelSettings: Seq[Setting[_]] = inThisBuild(Seq(
|
||||
organization := "org.scala-sbt",
|
||||
version := "0.13.15-SNAPSHOT",
|
||||
version := "0.13.16-SNAPSHOT",
|
||||
bintrayOrganization := Some(if (publishStatus.value == "releases") "typesafe" else "sbt"),
|
||||
bintrayRepository := s"ivy-${publishStatus.value}",
|
||||
bintrayPackage := "sbt",
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@ object Sync {
|
|||
}
|
||||
|
||||
import java.io.{ File, IOException }
|
||||
import java.util.zip.ZipException
|
||||
import sbinary._
|
||||
import Operations.{ read, write }
|
||||
import DefaultProtocol.{ FileFormat => _, _ }
|
||||
|
|
@ -82,7 +83,15 @@ object Sync {
|
|||
|
||||
def readInfo[F <: FileInfo](file: File)(implicit infoFormat: Format[F]): RelationInfo[F] =
|
||||
try { readUncaught(file)(infoFormat) }
|
||||
catch { case e: IOException => (Relation.empty, Map.empty) }
|
||||
catch {
|
||||
case e: IOException => (Relation.empty, Map.empty)
|
||||
case e: ZipException => (Relation.empty, Map.empty)
|
||||
case e: TranslatedException =>
|
||||
e.getCause match {
|
||||
case e: ZipException => (Relation.empty, Map.empty)
|
||||
case _ => throw e
|
||||
}
|
||||
}
|
||||
|
||||
def readUncaught[F <: FileInfo](file: File)(implicit infoFormat: Format[F]): RelationInfo[F] =
|
||||
IO.gzipFileIn(file) { in =>
|
||||
|
|
|
|||
Loading…
Reference in New Issue