mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-03 12:05:59 +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",
|
"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",
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user