Skip to content

Commit

Permalink
Cleanup DefaultOciLayerTask
Browse files Browse the repository at this point in the history
  • Loading branch information
SgtSilvio committed Dec 12, 2024
1 parent 2f07f28 commit b78ceea
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import org.apache.commons.compress.archivers.tar.TarArchiveOutputStream
import org.gradle.api.Action
import org.gradle.api.tasks.Internal
import org.gradle.api.tasks.Nested
import java.nio.file.attribute.FileTime

abstract class DefaultOciLayerTask : OciLayerTask() {

Expand All @@ -27,7 +28,7 @@ abstract class DefaultOciLayerTask : OciLayerTask() {
setPermissions(fileMetadata.permissions)
setUserId(fileMetadata.userId)
setGroupId(fileMetadata.groupId)
setModTime(fileMetadata.modificationTime.toEpochMilli())
lastModifiedTime = FileTime.from(fileMetadata.modificationTime)
size = fileMetadata.size
})
fileSource.copyTo(tos)
Expand All @@ -39,7 +40,7 @@ abstract class DefaultOciLayerTask : OciLayerTask() {
setPermissions(fileMetadata.permissions)
setUserId(fileMetadata.userId)
setGroupId(fileMetadata.groupId)
setModTime(fileMetadata.modificationTime.toEpochMilli())
lastModifiedTime = FileTime.from(fileMetadata.modificationTime)
})
tos.closeArchiveEntry()
}
Expand Down

0 comments on commit b78ceea

Please sign in to comment.