summaryrefslogtreecommitdiff
path: root/lisp/net/ange-ftp.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/net/ange-ftp.el')
-rw-r--r--lisp/net/ange-ftp.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el
index 5e9ba6d9cea..2b8c7ae145b 100644
--- a/lisp/net/ange-ftp.el
+++ b/lisp/net/ange-ftp.el
@@ -4084,7 +4084,8 @@ directory, so that Emacs will know its current contents."
(or (file-exists-p parent)
(ange-ftp-make-directory parent parents))))
(if (file-exists-p dir)
- (error "Cannot make directory %s: file already exists" dir)
+ (unless parents
+ (error "Cannot make directory %s: file already exists" dir))
(let ((parsed (ange-ftp-ftp-name dir)))
(if parsed
(let* ((host (nth 0 parsed))