fix resolver lock
All checks were successful
docker / build-docker (push) Successful in 3m35s

This commit is contained in:
royalcat 2024-09-01 02:10:47 +03:00
parent f75188b412
commit abcd073643

View file

@ -235,6 +235,9 @@ func (r *Resolver) nestedFs(ctx context.Context, fsPath string, file File) (File
return nil, fmt.Errorf("error calculating file hash: %w", err) return nil, fmt.Errorf("error calculating file hash: %w", err)
} }
r.m.Lock()
defer r.m.Unlock()
if nestedFs, ok := r.fsmap[fileHash]; ok { if nestedFs, ok := r.fsmap[fileHash]; ok {
return nestedFs, file.Close(ctx) return nestedFs, file.Close(ctx)
} }