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:
parent
a068ecd048
commit
a005a14db5
1 changed files with 0 additions and 13 deletions
|
@ -51,19 +51,6 @@ public class JarUtils {
|
||||||
log(2, "Writing contents of directory $foundFile")
|
log(2, "Writing contents of directory $foundFile")
|
||||||
|
|
||||||
// Directory
|
// 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("**")))
|
val includedFile = IncludedFile(From(foundFile.path), To(""), listOf(IFileSpec.GlobSpec("**")))
|
||||||
addSingleFile(".", includedFile, outputStream, expandJarFiles)
|
addSingleFile(".", includedFile, outputStream, expandJarFiles)
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue