fixing tar-create (bad timestamps and wrong args to directory-fold-tree)

Fixes issue #344.
This commit is contained in:
Alex Shinn 2016-06-01 00:42:43 +09:00
parent dbeb784701
commit b238edb0cd

View file

@ -165,7 +165,7 @@
(tar-gid-set! tar (file-group st)) (tar-gid-set! tar (file-group st))
(tar-owner-set! tar (file-owner-or-nobody st)) (tar-owner-set! tar (file-owner-or-nobody st))
(tar-group-set! tar (file-group-or-nobody st)) (tar-group-set! tar (file-group-or-nobody st))
(tar-time-set! tar (+ 1262271600 (file-modification-time st))) (tar-time-set! tar (file-modification-time st))
(tar-type-set! tar (cond ((file-link? st) "2") (tar-type-set! tar (cond ((file-link? st) "2")
((file-character? st) "3") ((file-character? st) "3")
((file-block? st) "4") ((file-block? st) "4")
@ -272,7 +272,7 @@
(make-bytevector (- 512 rem) 0) out))))) (make-bytevector (- 512 rem) 0) out)))))
(cons (cons (tar-path tar) src) acc)))))) (cons (cons (tar-path tar) src) acc))))))
(if (and src0 (not no-recurse?)) (if (and src0 (not no-recurse?))
(directory-fold-tree src0 kons acc kons) (directory-fold-tree src0 #f #f kons acc)
(kons src0 acc)))) (kons src0 acc))))
'() files) '() files)
(write-bytevector (make-bytevector 1024 0) out) (write-bytevector (make-bytevector 1024 0) out)