mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-18 19:07:34 +00:00
Fix problem with relative directories in CDPATH
* lisp/files.el (parse-colon-path): Allow relative directories (like ".") in CDPATH (bug#49918).
This commit is contained in:
parent
c62e805d80
commit
9a6fc63843
2 changed files with 8 additions and 2 deletions
|
|
@ -782,7 +782,10 @@ nil (meaning `default-directory') as the associated list element."
|
|||
(let ((spath (substitute-env-vars search-path)))
|
||||
(mapcar (lambda (f)
|
||||
(if (equal "" f) nil
|
||||
(let ((dir (expand-file-name (file-name-as-directory f))))
|
||||
(let ((dir (file-name-as-directory f)))
|
||||
(when (file-name-absolute-p dir)
|
||||
;; Expand "~".
|
||||
(setq dir (expand-file-name dir)))
|
||||
;; Previous implementation used `substitute-in-file-name'
|
||||
;; which collapse multiple "/" in front. Do the same for
|
||||
;; backward compatibility.
|
||||
|
|
|
|||
|
|
@ -1461,7 +1461,10 @@ See <https://debbugs.gnu.org/36401>."
|
|||
(should (equal (parse-colon-path "x:/foo//bar/baz")
|
||||
'("x:/foo/bar/baz/")))
|
||||
(should (equal (parse-colon-path "/foo//bar/baz")
|
||||
'("/foo/bar/baz/")))))
|
||||
'("/foo/bar/baz/"))))
|
||||
|
||||
(should (equal (parse-colon-path ".:/tmp")
|
||||
'("./" "/tmp/"))))
|
||||
|
||||
(ert-deftest files-test-magic-mode-alist-doctype ()
|
||||
"Test that DOCTYPE and variants put files in mhtml-mode."
|
||||
|
|
|
|||
Loading…
Reference in a new issue