mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-17 17:33:47 +00:00
accounts/keystore: fix cache update and TestUpdatedKeyfileContents failing on macOS
This commit is contained in:
parent
0131bd6ff9
commit
599ba6032e
1 changed files with 3 additions and 1 deletions
|
|
@ -23,6 +23,7 @@ import (
|
|||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"sort"
|
||||
"strings"
|
||||
"sync"
|
||||
|
|
@ -260,7 +261,8 @@ func (fc *fileCache) scanFiles(keyDir string) (set.Interface, set.Interface, set
|
|||
continue
|
||||
}
|
||||
filesNow.Add(path)
|
||||
if modTime.After(prevMtime) {
|
||||
// on macOS, we get FS notifications before the actual modTime is updated
|
||||
if modTime.After(prevMtime) || (modTime.Equal(prevMtime) && runtime.GOOS == "darwin") {
|
||||
moddedFiles.Add(path)
|
||||
}
|
||||
if modTime.After(newMtime) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue