Add missing error check in RegexpFs Open

This commit is contained in:
Robin Brämer 2020-04-18 19:14:24 +02:00 committed by GitHub
parent a2fefa4cb9
commit 70f98daaf3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -126,6 +126,9 @@ func (r *RegexpFs) Open(name string) (File, error) {
} }
} }
f, err := r.source.Open(name) f, err := r.source.Open(name)
if err != nil {
return nil, err
}
return &RegexpFile{f: f, re: r.re}, nil return &RegexpFile{f: f, re: r.re}, nil
} }