]> git.eshelyaron.com Git - emacs.git/commit
Fix some file-name-case-insensitive glitches
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 16 Sep 2019 05:15:04 +0000 (22:15 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 16 Sep 2019 05:15:28 +0000 (22:15 -0700)
commitbe828883475eddff0bb8cf6825f0d3383391c122
treea187ddd00d189fea525498c07cf4c4e28768bb08
parent5711c076dc63ecc0907f2b9cfe04035e0bd6a0b4
Fix some file-name-case-insensitive glitches

* src/fileio.c (file_name_directory): New static function,
broken out of Ffile_name_directory.
(file_name_case_insensitive_err, Ffile_writable_p, Fdo_auto_save):
Use it.
(file_name_case_insensitive_err): Rename from
file_name_case_insensitive_p.  Accept an unencoded Lisp_Object
rather than an encoded char *, so that platforms other than
Cygwin and macOS need not encode the file name.  Return an int
-1, 0, errno rather than a bool (setting errno if false),
so that the caller can distinguish an error from false.
All callers changed.
(Ffile_name_case_insensitive_p): Don’t issue system calls on
platforms other than Cygwin and macOS.  Fix bug that broke the
attempt to move up the filesystem tree (it moved up only one
level).
src/fileio.c