Add more error handling

This commit is contained in:
Alexander Neumann
2021-01-30 19:35:46 +01:00
parent aef3658a5f
commit 0858fbf6aa
23 changed files with 91 additions and 36 deletions

View File

@@ -25,7 +25,8 @@ func writeDump(ctx context.Context, repo restic.Repository, tree *restic.Tree, r
rootNode.Path = rootPath
err := dumpTree(ctx, repo, rootNode, rootPath, dmp)
if err != nil {
dmp.Close()
// ignore subsequent errors
_ = dmp.Close()
return err
}