|
|
|
@ -39,6 +39,8 @@ type fileCache struct { |
|
|
|
|
func (fc *fileCache) scan(keyDir string) (mapset.Set[string], mapset.Set[string], mapset.Set[string], error) { |
|
|
|
|
t0 := time.Now() |
|
|
|
|
|
|
|
|
|
fc.mu.Lock() |
|
|
|
|
defer fc.mu.Unlock() |
|
|
|
|
// List all the files from the keystore folder
|
|
|
|
|
files, err := os.ReadDir(keyDir) |
|
|
|
|
if err != nil { |
|
|
|
@ -46,9 +48,6 @@ func (fc *fileCache) scan(keyDir string) (mapset.Set[string], mapset.Set[string] |
|
|
|
|
} |
|
|
|
|
t1 := time.Now() |
|
|
|
|
|
|
|
|
|
fc.mu.Lock() |
|
|
|
|
defer fc.mu.Unlock() |
|
|
|
|
|
|
|
|
|
// Iterate all the files and gather their metadata
|
|
|
|
|
all := mapset.NewThreadUnsafeSet[string]() |
|
|
|
|
mods := mapset.NewThreadUnsafeSet[string]() |
|
|
|
|