From: Michael Albinus Date: Fri, 23 Dec 2011 14:31:35 +0000 (+0100) Subject: * net/ange-ftp.el (ange-ftp-copy-file-internal): Check for X-Git-Tag: emacs-pretest-24.0.93~120 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=bffcee0ae34feab9b8b6f7d769f1107418eab724;p=emacs.git * net/ange-ftp.el (ange-ftp-copy-file-internal): Check for existence of source file. (Bug#10325) --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f1a3a452367..4f7d61b9cb1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-12-23 Michael Albinus + + * net/ange-ftp.el (ange-ftp-copy-file-internal): Check for + existence of source file. (Bug#10325) + 2011-12-23 Alan Mackenzie Fix unstable fontification inside templates. diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el index 06d200c4e3e..b7fdd9a9bd8 100644 --- a/lisp/net/ange-ftp.el +++ b/lisp/net/ange-ftp.el @@ -3637,6 +3637,10 @@ so return the size on the remote host exactly. See RFC 3659." (setq filename (expand-file-name filename) newname (expand-file-name newname)) + (or (file-exists-p filename) + (signal 'file-error + (list "Copy file" "no such file or directory" filename))) + ;; canonicalize newname if a directory. (if (file-directory-p newname) (setq newname (expand-file-name (file-name-nondirectory filename) newname)))