Skip to content
Permalink
Browse files

Allow (retrieve-file name :if-exists nil) to silently ignore files wh…

…ich exist locally

It wasn't possible to use nil, as retrieve-file would
subsequently try to write to the stream NIL.
  • Loading branch information...
darabi committed May 31, 2015
1 parent c0f77ba commit 07975fd2a0db15093285a4f48f839927df9db5b7
Showing with 3 additions and 1 deletion.
  1. +3 −1 ftp.lisp
@@ -424,7 +424,9 @@ without ending up with a CR/CR/LF sequence."
'(unsigned-byte 8))
(:ascii
'character)))
(retrieve-file conn remote-filename local-stream :type type :rest rest)))
;; if-exists can be nil, so we have to check if local-stream is non-nil
(when local-stream
(retrieve-file conn remote-filename local-stream :type type :rest rest))))

(defmethod retrieve-file ((conn ftp-connection) (remote-filename string) (local-stream stream) &key (type :binary) (rest nil))
(with-transfer-socket (s conn (format nil "RETR ~A" remote-filename)

0 comments on commit 07975fd

Please sign in to comment.
You can’t perform that action at this time.