mirror of
https://github.com/rabbibotton/clog.git
synced 2025-12-06 10:40:45 -08:00
don't use passed end of file
This commit is contained in:
parent
1f9d513252
commit
ace126f678
1 changed files with 4 additions and 3 deletions
|
|
@ -183,9 +183,10 @@
|
|||
"Read local file named INFILE"
|
||||
(with-open-file (instream infile :direction :input :if-does-not-exist nil)
|
||||
(when instream
|
||||
(let ((string (make-string (file-length instream))))
|
||||
(read-sequence string instream)
|
||||
string))))
|
||||
(let* ((len (file-length instream))
|
||||
(string (make-string len))
|
||||
(pos (read-sequence string instream)))
|
||||
(subseq string 0 pos)))))
|
||||
|
||||
(defun write-file (string outfile &key (action-if-exists :rename))
|
||||
"Write local file named OUTFILE"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue