diff options
author | Ron Yorston <rmy@pobox.com> | 2022-12-22 11:16:57 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2022-12-22 11:16:57 +0000 |
commit | b11352dcbdd94e23224057056594ddc165883c19 (patch) | |
tree | 49ec413787f5cf886815408a1f40fbd86d679694 /init | |
parent | aeef07a0752ffdc98e1d5a32c508794b93c9f79d (diff) | |
download | busybox-w32-b11352dcbdd94e23224057056594ddc165883c19.tar.gz busybox-w32-b11352dcbdd94e23224057056594ddc165883c19.tar.bz2 busybox-w32-b11352dcbdd94e23224057056594ddc165883c19.zip |
win32: prevent stat(2) from updating access times
The WIN32 implementation of stat(2) reads the contents of some files
to see if they're executable. This may update the file access time.
Avoid this by a special call to SetFileTime() after opening the file.
For details see:
https://devblogs.microsoft.com/oldnewthing/20111010-00/?p=9433
https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-setfiletime
File access times aren't updated by default in recent versions of
Windows. This commit is only necessary if updating of file access
times is explicitly enabled:
fsutil behavior set DisableLastAccess 0
Diffstat (limited to 'init')
0 files changed, 0 insertions, 0 deletions