;;;; 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.")
(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
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))
"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))))))))