1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-26 16:28:12 -07:00

avoid adding empty "classes" directory entry to Jar file

(this did add the empty "classes" directory to kobalt-0.xxx.jar)
This commit is contained in:
DevCharly 2016-06-07 14:05:30 +02:00
parent a068ecd048
commit a005a14db5

View file

@ -51,19 +51,6 @@ public class JarUtils {
log(2, "Writing contents of directory $foundFile")
// Directory
var name = foundFile.name
if (!name.isEmpty()) {
if (!name.endsWith("/")) name += "/"
val entry = JarEntry(name)
entry.time = localFile.lastModified()
try {
outputStream.putNextEntry(entry)
} catch(ex: ZipException) {
log(2, "Can't add $name: ${ex.message}")
} finally {
outputStream.closeEntry()
}
}
val includedFile = IncludedFile(From(foundFile.path), To(""), listOf(IFileSpec.GlobSpec("**")))
addSingleFile(".", includedFile, outputStream, expandJarFiles)
} else {