We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3da0d32 commit 950faefCopy full SHA for 950faef
internal/dnf/dnf.go
@@ -136,10 +136,12 @@ type historyDB struct {
136
// This function may return a nil *historyDB, which is still safe to use.
137
func openHistoryDB(ctx context.Context, sys fs.FS) (*historyDB, error) {
138
var found *dbDesc
139
+Stat:
140
for _, v := range possible {
141
switch _, err := fs.Stat(sys, v.Path); {
142
case errors.Is(err, nil):
143
found = &v
144
+ break Stat
145
case errors.Is(err, fs.ErrNotExist): // OK
146
default:
147
return nil, fmt.Errorf("internal/dnf: unexpected error handling fs.FS: %w", err)
0 commit comments