4
0
Fork 0
mirror of https://github.com/Anvilcraft/modpacktools synced 2024-12-27 14:43:41 +01:00

fix Path.toZip missing directory entries

This commit is contained in:
LordMZTE 2021-02-12 17:45:54 +01:00
parent 3fbd93a519
commit ea16f1cb41
2 changed files with 6 additions and 0 deletions

0
gradlew vendored Normal file → Executable file
View file

View file

@ -128,6 +128,12 @@ fun Path.toZip(zStream: ZipOutputStream) {
zStream.closeEntry()
return FileVisitResult.CONTINUE
}
override fun preVisitDirectory(dir: Path, attrs: BasicFileAttributes?): FileVisitResult {
zStream.putNextEntry(ZipEntry(this@toZip.relativize(dir).toString()))
zStream.closeEntry()
return FileVisitResult.CONTINUE
}
}
)
}