# HG changeset patch # User Gerd Moellmann # Date 994669056 0 # Node ID 3c2404604bae23ba4cde520917964ea831367750 # Parent e0de2b7e4d811a481dee006ed80e38a13d688236 (ange-ftp-file-modtime): Check a 213 response from the server for the format we expect. Don't use it if it doesn't look like what the Internet draft for FTP extensions specifies. diff -r e0de2b7e4d81 -r 3c2404604bae lisp/net/ange-ftp.el --- a/lisp/net/ange-ftp.el Mon Jul 09 00:49:22 2001 +0000 +++ b/lisp/net/ange-ftp.el Mon Jul 09 08:57:36 2001 +0000 @@ -3437,8 +3437,12 @@ (list 'quote "mdtm" (cadr (cdr parsed))))) (line (cdr res)) (modtime '(0 0))) - (when (string-match "^213" line) - ;; MDTM should return "213 YYYYMMDDhhmmss" GMT on success. + ;; MDTM should return "213 YYYYMMDDhhmmss" GMT on success + ;; following the Internet draft for FTP extensions. + ;; Bob@rattlesnake.com reports that is returns something different + ;; for at least one FTP server. So, let's use the response only + ;; if it matches the Internet draft. + (when (string-match "^213 [0-9]\\{14\\}$" line) (setq modtime (encode-time (string-to-number (substring line 16 18))