Fix bug with make-directory on MS-Windows root

* lisp/files.el (files--ensure-directory): Treat any error, not
just file-already-exists, as an opportunity to check whether DIR
is already a directory (Bug#28508).
This commit is contained in:
Paul Eggert 2017-09-19 01:47:39 -07:00
parent 066efb8666
commit 1a01423b3c

View file

@ -5337,7 +5337,7 @@ instance of such commands."
"Make directory DIR if it is not already a directory. Return nil."
(condition-case err
(make-directory-internal dir)
(file-already-exists
(error
(unless (file-directory-p dir)
(signal (car err) (cdr err))))))