Mercurial > emacs
changeset 7829:5412b8112b6e
(ange-ftp-canonize-filename): Preserve // after colon.
(ange-ftp-expand-file-name): Likewise.
(ange-ftp-canonize-filename): Preserve // at very beginning.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 07 Jun 1994 17:58:32 +0000 |
parents | cfe470ebd714 |
children | 1f9ae5be19a2 |
files | lisp/ange-ftp.el |
diffstat | 1 files changed, 10 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ange-ftp.el Tue Jun 07 17:34:44 1994 +0000 +++ b/lisp/ange-ftp.el Tue Jun 07 17:58:32 1994 +0000 @@ -851,7 +851,7 @@ ;;;; Internal variables. ;;;; ------------------------------------------------------------ -(defconst ange-ftp-version "$Revision: 1.52 $") +(defconst ange-ftp-version "$Revision: 1.53 $") (defvar ange-ftp-data-buffer-name " *ftp data*" "Buffer name to hold directory listing data received from ftp process.") @@ -2748,7 +2748,7 @@ (defun ange-ftp-canonize-filename (n) "Take a string and short-circuit //, /. and /.." - (if (string-match ".+//" n) ;don't upset Apollo users + (if (string-match "[^:]+//" n) ;don't upset Apollo users (setq n (substring n (1- (match-end 0))))) (let ((parsed (ange-ftp-ftp-name n))) (if parsed @@ -2783,12 +2783,13 @@ name)) (error "Unable to obtain CWD"))))) - (setq name (ange-ftp-real-expand-file-name name)) - - ;; see if hit real expand-file-name bug... this will probably annoy - ;; some Apollo people. I'll wait until they shout, however. - (if (string-match "^//" name) - (setq name (substring name 1))) + ;; If name starts with //, preserve that, for apollo system. + (if (not (string-match "^//" path)) + (progn + (setq path (ange-ftp-real-expand-file-name path)) + + (if (string-match "^//" path) + (setq path (substring path 1))))) ;; Now substitute the expanded name back into the overall filename. (ange-ftp-replace-name-component n name)) @@ -2804,7 +2805,7 @@ "Documented as original." (ange-ftp-save-match-data (if (eq (string-to-char name) ?/) - (while (cond ((string-match ".+//" name) ;don't upset Apollo users + (while (cond ((string-match "[^:]+//" name) ;don't upset Apollo users (setq name (substring name (1- (match-end 0))))) ((string-match "/~" name) (setq name (substring name (1- (match-end 0))))))))