Add more error handling

This commit is contained in:
Alexander Neumann committed 2021-01-30 20:19:47 +01:00
1 parent aef3658a5f
commit 0858fbf6aa
23 files changed
+91 -36

No files matched your search

+2 -1
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
}