X-Git-Url: https://git.giacomolli.uk/onechat/blobdiff_plain/80e348724041a694002fc38f57e8868b9b9a2be9..c781f79f3c8cb9a7577ee1574d196988da2719b3:/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