]> git.eshelyaron.com Git - emacs.git/commitdiff
* net/ange-ftp.el (ange-ftp-copy-file-internal): Check for
authorMichael Albinus <michael.albinus@gmx.de>
Fri, 23 Dec 2011 14:31:35 +0000 (15:31 +0100)
committerMichael Albinus <michael.albinus@gmx.de>
Fri, 23 Dec 2011 14:31:35 +0000 (15:31 +0100)
existence of source file.  (Bug#10325)

lisp/ChangeLog
lisp/net/ange-ftp.el

index f1a3a452367388f2e90a419d2268826f1de6822c..4f7d61b9cb105ca966956b26d604bc2d0f47ed91 100644 (file)
@@ -1,3 +1,8 @@
+2011-12-23  Michael Albinus  <michael.albinus@gmx.de>
+
+       * net/ange-ftp.el (ange-ftp-copy-file-internal): Check for
+       existence of source file.  (Bug#10325)
+
 2011-12-23  Alan Mackenzie  <acm@muc.de>
 
        Fix unstable fontification inside templates.
index 06d200c4e3e1f47dabc694e2facf1481723e47f4..b7fdd9a9bd8201b50587b5af53aa84d6646f6f49 100644 (file)
@@ -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)))