]> git.ipfire.org Git - thirdparty/ccache.git/commit
Stat: treat pending deletes as missing files on Windows 832/head
authorNicholas Hutchinson <nshutchinson@gmail.com>
Sun, 4 Apr 2021 15:44:43 +0000 (16:44 +0100)
committerNicholas Hutchinson <nshutchinson@gmail.com>
Sun, 4 Apr 2021 16:54:27 +0000 (17:54 +0100)
commitc8442ee373a3d7c3cbf498f8664d4ad273b26a30
treeb4952b7806b4378bd7fd6d97a9d40ac9bb7c67c7
parent390f37382b9381f73e3f548143029e6ae48859ff
Stat: treat pending deletes as missing files on Windows

Win32 functions like `CreateFile` return `ERROR_ACCESS_DENIED` when a
file is in the process of being deleted, which gets mapped to an errno
of `EACCES`. For the purposes of `Stat::stat` and `Stat::lstat`, it's
more useful to treat this as a missing file and mapping this to an errno
of `ENOENT`.
src/Stat.cpp
src/Win32Util.cpp
src/Win32Util.hpp
src/system.hpp
unittest/test_Stat.cpp