mirror of
https://github.com/gotson/komga.git
synced 2026-05-09 05:10:19 +02:00
exclude directories from zip files listing
This commit is contained in:
parent
aa4d62738a
commit
10f5917d1c
1 changed files with 4 additions and 1 deletions
|
|
@ -9,7 +9,10 @@ import java.nio.file.Path
|
|||
class ZipExtractor : ArchiveExtractor() {
|
||||
|
||||
override fun getFilenames(path: Path) =
|
||||
ZipFile(path.toFile()).fileHeaders.map { it.fileName }.sortedWith(natSortComparator)
|
||||
ZipFile(path.toFile()).fileHeaders
|
||||
.filter { !it.isDirectory }
|
||||
.map { it.fileName }
|
||||
.sortedWith(natSortComparator)
|
||||
|
||||
override fun getEntryStream(path: Path, entryName: String): InputStream =
|
||||
ZipFile(path.toFile()).let {
|
||||
|
|
|
|||
Loading…
Reference in a new issue