summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDrew Adams <drew.adams@oracle.com>2012-01-28 12:26:29 +0100
committerMichael Albinus <michael.albinus@gmx.de>2012-01-28 12:26:29 +0100
commit4372494f8f897d129134159e03d69e7b59c27679 (patch)
tree3964bbff8515de4ef374a3cc292e032383c32bed
parent4d4ec1f815374dbb14907029cbfdf0c80148a032 (diff)
downloademacs-4372494f8f897d129134159e03d69e7b59c27679.tar.gz
* net/ange-ftp.el (ange-ftp-canonize-filename): Check, that
`default-directory' is non-nil.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/net/ange-ftp.el3
2 files changed, 7 insertions, 1 deletions
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 <drew.adams@oracle.com>
+
+ * net/ange-ftp.el (ange-ftp-canonize-filename): Check, that
+ `default-directory' is non-nil.
+
2012-01-28 Eli Zaretskii <eliz@gnu.org>
* 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.