# HG changeset patch # User Richard M. Stallman # Date 771011912 0 # Node ID 5412b8112b6eefc4679e02b1786ebe9e22bf783d # Parent cfe470ebd714a7d31f40564dfafbd25f15f0f5cd (ange-ftp-canonize-filename): Preserve // after colon. (ange-ftp-expand-file-name): Likewise. (ange-ftp-canonize-filename): Preserve // at very beginning. diff -r cfe470ebd714 -r 5412b8112b6e lisp/ange-ftp.el --- 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))))))))