mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-02 03:26:06 +01:00
commons-compress 1.25.0
This commit is contained in:
@@ -39,7 +39,7 @@ libraryDependencies ++= Seq(
|
||||
"commons-io" % "commons-io" % "2.15.0",
|
||||
"io.github.gitbucket" % "solidbase" % "1.0.5",
|
||||
"io.github.gitbucket" % "markedj" % "1.0.18",
|
||||
"org.apache.commons" % "commons-compress" % "1.24.0",
|
||||
"org.apache.commons" % "commons-compress" % "1.25.0",
|
||||
"org.apache.commons" % "commons-email" % "1.5",
|
||||
"commons-net" % "commons-net" % "3.10.0",
|
||||
"org.apache.httpcomponents" % "httpclient" % "4.5.14",
|
||||
|
||||
@@ -1238,8 +1238,8 @@ trait RepositoryViewerControllerBase extends ControllerBase {
|
||||
repository: RepositoryService.RepositoryInfo,
|
||||
path: String
|
||||
) = {
|
||||
def archive(revision: String, archiveFormat: String, archive: ArchiveOutputStream)(
|
||||
entryCreator: (String, Long, java.util.Date, Int) => ArchiveEntry
|
||||
def archive[A <: ArchiveEntry](revision: String, archiveFormat: String, archive: ArchiveOutputStream[A])(
|
||||
entryCreator: (String, Long, java.util.Date, Int) => A
|
||||
): Unit = {
|
||||
Using.resource(Git.open(getRepositoryDir(repository.owner, repository.name))) { git =>
|
||||
val oid = git.getRepository.resolve(revision)
|
||||
@@ -1281,7 +1281,7 @@ trait RepositoryViewerControllerBase extends ControllerBase {
|
||||
)
|
||||
}
|
||||
|
||||
val entry: ArchiveEntry = entryCreator(entryPath, size, date, mode)
|
||||
val entry: A = entryCreator(entryPath, size, date, mode)
|
||||
archive.putArchiveEntry(entry)
|
||||
Using.resource(new FileInputStream(tempFile)) { in =>
|
||||
IOUtils.copy(in, archive)
|
||||
|
||||
Reference in New Issue
Block a user