]> git.eshelyaron.com Git - emacs.git/commit
Fix file-name-case-insensitive-p in ffap (bug#56443)
authorMattias Engdegård <mattiase@acm.org>
Fri, 8 Jul 2022 13:09:16 +0000 (15:09 +0200)
committerMattias Engdegård <mattiase@acm.org>
Fri, 8 Jul 2022 13:13:21 +0000 (15:13 +0200)
commit6791165b2a0e707f719efec08aad62cdf6ed8ad3
treed98f464114aa6b60c7fa8156e26e3edb9a019585
parent739e3dbe050468e1d9aa0a48bfc656ae20fd8f9d
Fix file-name-case-insensitive-p in ffap (bug#56443)

Don't crash if the file name argument to file-name-case-insensitive-p,
after expansion, doesn't have a parent directory.  This occurs
when calling ffap on something that looks like an email address.

* src/fileio.c (Ffile_name_case_insensitive_p): Return nil if no file
or parent directory could be found.
* test/src/fileio-tests.el (fileio-tests--identity-expand-handler)
(fileio--file-name-case-insensitive-p): New test.
src/fileio.c
test/src/fileio-tests.el