Don't --load directories

* lisp/startup.el (command-line-1): Only pass expanded FILENAME argument
of --load when it refers to a normal file, since `load' doesn't handle
directories (Bug #16406).
This commit is contained in:
Noam Postavsky 2016-08-21 10:51:38 -04:00
parent 55dde6c1a2
commit a08ce41ed8

View file

@ -2393,7 +2393,7 @@ nil default-directory" name)
;; Take file from default dir if it exists there;
;; otherwise let `load' search for it.
(file-ex (expand-file-name file)))
(when (file-exists-p file-ex)
(when (file-regular-p file-ex)
(setq file file-ex))
(load file nil t)))