commons-compress 1.25.0

This commit is contained in:
xuwei-k
2023-11-16 12:01:50 +09:00
committed by kenji yoshida
parent 66d9ce328d
commit 0db23b7f4a
2 changed files with 4 additions and 4 deletions

View File

@@ -39,7 +39,7 @@ libraryDependencies ++= Seq(
"commons-io" % "commons-io" % "2.15.0", "commons-io" % "commons-io" % "2.15.0",
"io.github.gitbucket" % "solidbase" % "1.0.5", "io.github.gitbucket" % "solidbase" % "1.0.5",
"io.github.gitbucket" % "markedj" % "1.0.18", "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", "org.apache.commons" % "commons-email" % "1.5",
"commons-net" % "commons-net" % "3.10.0", "commons-net" % "commons-net" % "3.10.0",
"org.apache.httpcomponents" % "httpclient" % "4.5.14", "org.apache.httpcomponents" % "httpclient" % "4.5.14",

View File

@@ -1238,8 +1238,8 @@ trait RepositoryViewerControllerBase extends ControllerBase {
repository: RepositoryService.RepositoryInfo, repository: RepositoryService.RepositoryInfo,
path: String path: String
) = { ) = {
def archive(revision: String, archiveFormat: String, archive: ArchiveOutputStream)( def archive[A <: ArchiveEntry](revision: String, archiveFormat: String, archive: ArchiveOutputStream[A])(
entryCreator: (String, Long, java.util.Date, Int) => ArchiveEntry entryCreator: (String, Long, java.util.Date, Int) => A
): Unit = { ): Unit = {
Using.resource(Git.open(getRepositoryDir(repository.owner, repository.name))) { git => Using.resource(Git.open(getRepositoryDir(repository.owner, repository.name))) { git =>
val oid = git.getRepository.resolve(revision) 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) archive.putArchiveEntry(entry)
Using.resource(new FileInputStream(tempFile)) { in => Using.resource(new FileInputStream(tempFile)) { in =>
IOUtils.copy(in, archive) IOUtils.copy(in, archive)