file/zip: recognize string ports as seekable
This commit is contained in:
parent
64bfb58dad
commit
da600ad291
|
@ -72,10 +72,11 @@
|
|||
|
||||
;; seekable-port? : port -> boolean
|
||||
(define (seekable-port? port)
|
||||
(or (string-port? port)
|
||||
(and (file-stream-port? port)
|
||||
(with-handlers ([void (lambda (exn) #f)])
|
||||
(file-position port (file-position port))
|
||||
#t)))
|
||||
#t))))
|
||||
|
||||
(define (write-int n size)
|
||||
(write-bytes (integer->integer-bytes n size #f #f)))
|
||||
|
|
Loading…
Reference in New Issue
Block a user