mirror of
https://gitlab.com/eql/lqml.git
synced 2025-12-06 02:30:38 -08:00
add hack to make 'unzip' work on iOS
This commit is contained in:
parent
ac9d2ebf07
commit
5644bded34
3 changed files with 26 additions and 2 deletions
|
|
@ -100,6 +100,21 @@ it saves uploaded files on the server."
|
|||
|
||||
(in-package :qml)
|
||||
|
||||
#+ios ;; hack for iOS, where 'read-sequence' doesn't update 'file-position'
|
||||
(progn
|
||||
(ext:package-lock :common-lisp nil)
|
||||
|
||||
(defvar cl-user::%read-sequence% (symbol-function 'cl:read-sequence))
|
||||
|
||||
(defun cl:read-sequence (buffer stream &rest arguments)
|
||||
(let ((p1 (file-position stream))
|
||||
(p2 (apply cl-user::%read-sequence% buffer stream arguments)))
|
||||
(when p1
|
||||
(file-position stream (+ p1 p2))) ; update manually
|
||||
p2))
|
||||
|
||||
(ext:package-lock :common-lisp t))
|
||||
|
||||
(defun zip (zip-file directory)
|
||||
"Creates a *.zip file of passed directory, _not_ including the directory name."
|
||||
(zip:zip (merge-pathnames zip-file)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue