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
(lambda () (read-bytes mlen)))])
(ormap (lambda (magic)
(equal? magic
(subbytes m 0 (bytes-length magic))))
(and (>= (bytes-length m) (bytes-length magic))
(equal? magic
(subbytes m 0
(bytes-length magic)))))
magics))
(or (not file)
(> (file-or-directory-modify-seconds f) time)))