mirror of
https://github.com/github/codeql.git
synced 2026-01-29 22:32:58 +01:00
extractor: Close files even when writes fail
This commit is contained in:
@@ -72,6 +72,8 @@ func trapFolder() (string, error) {
|
||||
func (tw *Writer) Close() error {
|
||||
err := tw.w.Flush()
|
||||
if err != nil {
|
||||
// throw away close error because write errors are likely to be more important
|
||||
tw.file.Close()
|
||||
return err
|
||||
}
|
||||
err = tw.file.Close()
|
||||
|
||||
Reference in New Issue
Block a user