Do not update directory access time (#15426)

Most setups will have relatime it only updates the access time 
following a change in the directory.
This commit is contained in:
Anis Elleuch 2022-07-28 20:40:48 +01:00 committed by GitHub
parent db8442584e
commit 2f1ef02d35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -232,7 +232,7 @@ func readDirFn(dirPath string, fn func(name string, typ os.FileMode) error) erro
// Return count entries at the directory dirPath and all entries
// if count is set to -1
func readDirWithOpts(dirPath string, opts readDirOpts) (entries []string, err error) {
f, err := Open(dirPath)
f, err := OpenFile(dirPath, readMode, 0)
if err != nil {
return nil, osErrToFileErr(err)
}