Mercurial > emacs
changeset 23570:e782dce34a19
(ange-ftp-canonicalize-filename): Do not use a UNC
path as a default directory when canonicalizing names.
author | Geoff Voelker <voelker@cs.washington.edu> |
---|---|
date | Fri, 30 Oct 1998 03:56:25 +0000 |
parents | b1255c3676c7 |
children | ae5eea3cc314 |
files | lisp/ange-ftp.el |
diffstat | 1 files changed, 9 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ange-ftp.el Fri Oct 30 03:49:09 1998 +0000 +++ b/lisp/ange-ftp.el Fri Oct 30 03:56:25 1998 +0000 @@ -3017,11 +3017,15 @@ ;; If name starts with //, preserve that, for apollo system. (if (not (string-match "^//" name)) (progn - (setq name (ange-ftp-real-expand-file-name name)) - ;; Strip off drive specifier added on windows-nt - (if (and (eq system-type 'windows-nt) - (string-match "^[a-zA-Z]:" name)) - (setq name (substring name 2))) + (if (not (eq system-type 'windows-nt)) + (setq name (ange-ftp-real-expand-file-name name)) + ;; Windows UNC default dirs do not make sense for ftp. + (if (string-match "^//" default-directory) + (setq name (ange-ftp-real-expand-file-name name "c:/")) + (setq name (ange-ftp-real-expand-file-name name))) + ;; Strip off possible drive specifier. + (if (string-match "^[a-zA-Z]:" name) + (setq name (substring name 2)))) (if (string-match "^//" name) (setq name (substring name 1)))))