X-Git-Url: https://git.giacomolli.uk/onechat/blobdiff_plain/f5c601f1801aaa276f8c335fcb51c373edc0b50c..959c24478e2c3a596a81cca359fd784c897f46a2:/backup_archive.go?ds=inline diff --git a/backup_archive.go b/backup_archive.go index 35a389c..3cd6013 100644 --- a/backup_archive.go +++ b/backup_archive.go @@ -101,6 +101,7 @@ func backupArchive(ctx context.Context, root, path string) (size int64, err erro return nil }) + err = errors.Join(err, archive.Close(), compressed.Close()) if err != nil { return 0, fmt.Errorf("write archive: %w", err) @@ -150,6 +151,7 @@ func backupExtract(ctx context.Context, path, root string) (err error) { ctx: ctx, reader: compressed, }) + seen := make(map[string]bool) var directories []*tar.Header