fix: load cache integrity as plain map (#60)
This commit is contained in:
parent
c67285a76c
commit
5e9fe2aebb
1 changed files with 6 additions and 1 deletions
7
cli/cache/integrity.go
vendored
7
cli/cache/integrity.go
vendored
|
@ -87,10 +87,15 @@ func loadHashCache() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := json.Unmarshal(hashCacheJSON, &hashCache); err != nil {
|
var plainCache map[string]hashInfo
|
||||||
|
if err := json.Unmarshal(hashCacheJSON, &plainCache); err != nil {
|
||||||
slog.Warn("failed to unmarshal hash cache, recreating", slog.Any("err", err))
|
slog.Warn("failed to unmarshal hash cache, recreating", slog.Any("err", err))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for k, v := range plainCache {
|
||||||
|
hashCache.Store(k, v)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func saveHashCache() {
|
func saveHashCache() {
|
||||||
|
|
Loading…
Reference in a new issue