fix variable scoping
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Steven Polley 2023-06-04 12:41:22 -06:00
parent c8cbebb7f9
commit bff4c107c1

View File

@ -42,7 +42,7 @@ var (
// Preload cached list of files and hashes
func init() {
romCache := ROMCache{}
romCache = ROMCache{}
romCache.Cached = make(map[string]bool)
go updateROMCache("public")
}
@ -81,7 +81,7 @@ func updateROMCache(romDirectory string) {
// skip already cached files
romCache.Lock()
if romCache.Cached[d.Name()] {
if _, ok := romCache.Cached[d.Name()]; ok {
romCache.Unlock()
return nil
}