diff options
author | Richard M. Stallman <rms@gnu.org> | 1994-06-07 17:58:32 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1994-06-07 17:58:32 +0000 |
commit | a5ee60ae7ecad35e5b91edf500bdf94ca279e826 (patch) | |
tree | e3023b536d2c6bd4afb7eed8d881e870f0a349b8 /lisp/ange-ftp.el | |
parent | 3fb181e4a9b8ef1d93b8de8e1e8e895bd3608951 (diff) | |
download | emacs-a5ee60ae7ecad35e5b91edf500bdf94ca279e826.tar.gz |
(ange-ftp-canonize-filename): Preserve // after colon.
(ange-ftp-expand-file-name): Likewise.
(ange-ftp-canonize-filename): Preserve // at very beginning.
Diffstat (limited to 'lisp/ange-ftp.el')
-rw-r--r-- | lisp/ange-ftp.el | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/lisp/ange-ftp.el b/lisp/ange-ftp.el index 174279ed52e..33c9b460e97 100644 --- a/lisp/ange-ftp.el +++ b/lisp/ange-ftp.el @@ -851,7 +851,7 @@ SIZE, if supplied, should be a prime number." ;;;; 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 @@ logged in as user USER and cd'd to directory DIR." (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 @@ logged in as user USER and cd'd to directory DIR." 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 @@ logged in as user USER and cd'd to directory DIR." "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)))))))) |