From 2f1ef02d35609581bc20617e9e1a0c5d24692f8a Mon Sep 17 00:00:00 2001 From: Anis Elleuch Date: Thu, 28 Jul 2022 20:40:48 +0100 Subject: [PATCH] Do not update directory access time (#15426) Most setups will have relatime it only updates the access time following a change in the directory. --- cmd/os_unix.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/os_unix.go b/cmd/os_unix.go index 782702502..96f77f5ff 100644 --- a/cmd/os_unix.go +++ b/cmd/os_unix.go @@ -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) }