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

fixed timestamps in created JAR files (was 1970-01-01 00:00)

This commit is contained in:
DevCharly 2016-06-01 11:59:30 +02:00
parent 37fc552476
commit 7b251f4d8e

View file

@ -55,7 +55,7 @@ public class JarUtils {
if (!name.isEmpty()) {
if (!name.endsWith("/")) name += "/"
val entry = JarEntry(name)
entry.time = foundFile.lastModified()
entry.time = localFile.lastModified()
try {
outputStream.putNextEntry(entry)
} catch(ex: ZipException) {
@ -81,7 +81,7 @@ public class JarUtils {
} else {
val entryFileName = file.to(foundFile.path).path.replace("\\", "/")
val entry = JarEntry(entryFileName)
entry.time = foundFile.lastModified()
entry.time = localFile.lastModified()
addEntry(FileInputStream(localFile), entry, outputStream, onError)
}
}