diff --git a/core/archive/src/main/java/yokai/core/archive/ZipWriter.kt b/core/archive/src/main/java/yokai/core/archive/ZipWriter.kt index 3ee02b02b7..9a776e106c 100644 --- a/core/archive/src/main/java/yokai/core/archive/ZipWriter.kt +++ b/core/archive/src/main/java/yokai/core/archive/ZipWriter.kt @@ -65,10 +65,10 @@ private fun StructStat.toArchiveStat() = ArchiveEntry.StructStat().apply { stSize = st_size stBlksize = st_blksize stBlocks = st_blocks - stAtim = timespec(st_atime) - stMtim = timespec(st_mtime) - stCtim = timespec(st_ctime) + stAtim = st_atime.toTimespec() + stMtim = st_mtime.toTimespec() + stCtim = st_ctime.toTimespec() stIno = st_ino } -private fun timespec(tvSec: Long) = ArchiveEntry.StructTimespec().also { it.tvSec = tvSec } +private fun Long.toTimespec() = ArchiveEntry.StructTimespec().also { it.tvSec = this }