From: Drew Adams Date: Sat, 28 Jan 2012 11:26:29 +0000 (+0100) Subject: * net/ange-ftp.el (ange-ftp-canonize-filename): Check, that X-Git-Tag: emacs-pretest-24.0.93~24 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4372494f8f897d129134159e03d69e7b59c27679;p=emacs.git * net/ange-ftp.el (ange-ftp-canonize-filename): Check, that `default-directory' is non-nil. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 14133949c7d..c374c71db38 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-01-28 Drew Adams + + * net/ange-ftp.el (ange-ftp-canonize-filename): Check, that + `default-directory' is non-nil. + 2012-01-28 Eli Zaretskii * mail/emacsbug.el (report-emacs-bug): Fill the potentially long diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el index 93954588fa9..4338cdff3cd 100644 --- a/lisp/net/ange-ftp.el +++ b/lisp/net/ange-ftp.el @@ -3098,7 +3098,8 @@ logged in as user USER and cd'd to directory DIR." (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. - (setq name (if (string-match "\\`//" default-directory) + (setq name (if (and default-directory + (string-match "\\`//" default-directory)) (ange-ftp-real-expand-file-name name "c:/") (ange-ftp-real-expand-file-name name))) ;; Strip off possible drive specifier.