]> git.eshelyaron.com Git - emacs.git/commit
Avoid unnecessary calls to GetFileAttributes on MS-Windows
authorEli Zaretskii <eliz@gnu.org>
Sun, 11 May 2025 16:27:13 +0000 (19:27 +0300)
committerEshel Yaron <me@eshelyaron.com>
Mon, 12 May 2025 19:55:39 +0000 (21:55 +0200)
commitff54e8f2e9079507a00602550e56709a056cba86
tree00b45561534be0e991d658c3b3d06ba980d02a3a
parent0d29139deeb4b9fbb4fa115992aa60920b01ed25
Avoid unnecessary calls to GetFileAttributes on MS-Windows

* src/w32.c (access_attrs): New function, refactored from
'faccessat'.
(faccessat): Call 'access_attrs' early to determine whether the
file doesn't exist, and if so, avoid calling 'chase_symlinks'.
Also avoid calling 'chase_symlinks' if it is known that the file
cannot be a symlink, given its attributes.  (Bug#78341)

(cherry picked from commit 882c849034a909a62179c38ee01cc08572fa1a68)
src/w32.c