diff options
| author | Gerd Moellmann | 2001-07-09 08:58:38 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2001-07-09 08:58:38 +0000 |
| commit | 524ac5b25a6a3cd21afa27280ca4eebb0a065d4b (patch) | |
| tree | 93a0041761ab975698f6ff619c77a13e2a90161e | |
| parent | 7443aaa688f3ef8014d2f9472c018982219eac97 (diff) | |
| download | emacs-524ac5b25a6a3cd21afa27280ca4eebb0a065d4b.tar.gz emacs-524ac5b25a6a3cd21afa27280ca4eebb0a065d4b.zip | |
(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.
| -rw-r--r-- | lisp/ChangeLog | 9 | ||||
| -rw-r--r-- | lisp/net/ange-ftp.el | 8 |
2 files changed, 14 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 289d6af3cd2..285c04bd078 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,4 +1,11 @@ | |||
| 1 | Mon Jul 09 2001 Martin Stjernholm <bug-cc-mode@gnu.org> | 1 | 2001-07-09 Gerd Moellmann <gerd@gnu.org> |
| 2 | |||
| 3 | * net/ange-ftp.el (ange-ftp-file-modtime): Check a 213 response | ||
| 4 | from the server for the format we expect. Don't use it if it | ||
| 5 | doesn't look like what the Internet draft for FTP extensions | ||
| 6 | specifies. | ||
| 7 | |||
| 8 | 2001-07-09 Martin Stjernholm <bug-cc-mode@gnu.org> | ||
| 2 | 9 | ||
| 3 | * cc-cmds.el: Extended the kludge to interoperate with the | 10 | * cc-cmds.el: Extended the kludge to interoperate with the |
| 4 | delsel and pending-del packages wrt to the new function | 11 | delsel and pending-del packages wrt to the new function |
diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el index 10b03a474cf..fb2f8120c4c 100644 --- a/lisp/net/ange-ftp.el +++ b/lisp/net/ange-ftp.el | |||
| @@ -3437,8 +3437,12 @@ Value is (0 0) if the modification time cannot be determined." | |||
| 3437 | (list 'quote "mdtm" (cadr (cdr parsed))))) | 3437 | (list 'quote "mdtm" (cadr (cdr parsed))))) |
| 3438 | (line (cdr res)) | 3438 | (line (cdr res)) |
| 3439 | (modtime '(0 0))) | 3439 | (modtime '(0 0))) |
| 3440 | (when (string-match "^213" line) | 3440 | ;; MDTM should return "213 YYYYMMDDhhmmss" GMT on success |
| 3441 | ;; MDTM should return "213 YYYYMMDDhhmmss" GMT on success. | 3441 | ;; following the Internet draft for FTP extensions. |
| 3442 | ;; Bob@rattlesnake.com reports that is returns something different | ||
| 3443 | ;; for at least one FTP server. So, let's use the response only | ||
| 3444 | ;; if it matches the Internet draft. | ||
| 3445 | (when (string-match "^213 [0-9]\\{14\\}$" line) | ||
| 3442 | (setq modtime | 3446 | (setq modtime |
| 3443 | (encode-time | 3447 | (encode-time |
| 3444 | (string-to-number (substring line 16 18)) | 3448 | (string-to-number (substring line 16 18)) |