From 4372494f8f897d129134159e03d69e7b59c27679 Mon Sep 17 00:00:00 2001 From: Drew Adams Date: Sat, 28 Jan 2012 12:26:29 +0100 Subject: [PATCH] * net/ange-ftp.el (ange-ftp-canonize-filename): Check, that `default-directory' is non-nil. --- lisp/ChangeLog | 5 +++++ lisp/net/ange-ftp.el | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) 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. -- 2.11.4.GIT