Subject: bug#30533: 26.0.60; (copy-file) over TRAMP FTP mistakes file for directory

From: Christian Johansson <[email-masked]>
Date: Tue, 20 Feb 2018 16:49:57 +0100

Ok this doesn't work for me with latest trunk, this is a public ftp so 
you should be able to connect.

(let ((remote-path "/ftp:[email-masked]:/1KB.zip")
       (local-path "~/Downloads/1KB.zip"))
   (if (file-regular-p remote-path)
       (progn
     (message "File %s is a regular file" remote-path)
     (copy-file remote-path local-path t t t t))
     (progn
       (message "File %s is a directory" remote-path)
       (copy-directory remote-path local-path t t t))))

Messages:
File /ftp:[email-masked]:/1KB.zip is a directory
tramp-file-name-handler: Opening directory: Not a directory, 
/ftp:[email-masked]:/1KB.zip