mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 00:17:11 -07:00
Merge pull request #268 from DevCharly/filename-in-checksum
fixes #267: include filenames in checksums
This commit is contained in:
commit
99c57a5865
1 changed files with 1 additions and 1 deletions
|
@ -24,7 +24,7 @@ public class Md5 {
|
|||
* a checksum of the last modified timestamp.
|
||||
*/
|
||||
fun toMd5Directories(filesOrDirectories: List<File>,
|
||||
toBytes: (File) -> ByteArray = { it.lastModified().toString().toByteArray() } ): String? {
|
||||
toBytes: (File) -> ByteArray = { "${it.path} ${it.lastModified()} ${it.length()}".toByteArray() } ): String? {
|
||||
if (filesOrDirectories.any { it.exists() }) {
|
||||
MessageDigest.getInstance("MD5").let { md5 ->
|
||||
var fileCount = 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue