fix magic search

svn: r16298
This commit is contained in:
Eli Barzilay 2009-10-12 16:53:04 +00:00
parent 1ed92878c6
commit 4773d2cefd

View File

@ -291,8 +291,10 @@
(let ([m (with-input-from-file f (let ([m (with-input-from-file f
(lambda () (read-bytes mlen)))]) (lambda () (read-bytes mlen)))])
(ormap (lambda (magic) (ormap (lambda (magic)
(and (>= (bytes-length m) (bytes-length magic))
(equal? magic (equal? magic
(subbytes m 0 (bytes-length magic)))) (subbytes m 0
(bytes-length magic)))))
magics)) magics))
(or (not file) (or (not file)
(> (file-or-directory-modify-seconds f) time))) (> (file-or-directory-modify-seconds f) time)))