aboutsummaryrefslogtreecommitdiffstats
path: root/lib/calendar
diff options
context:
space:
mode:
Diffstat (limited to 'lib/calendar')
-rw-r--r--lib/calendar/calendar.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/calendar/calendar.go b/lib/calendar/calendar.go
index ebe1b771..c15e0351 100644
--- a/lib/calendar/calendar.go
+++ b/lib/calendar/calendar.go
@@ -119,7 +119,10 @@ type calendar struct {
func parse(reader io.Reader) (*calendar, error) {
// fix capitalized mailto for parsing of ics file
var sb strings.Builder
- io.Copy(&sb, reader)
+ _, err := io.Copy(&sb, reader)
+ if err != nil {
+ return nil, fmt.Errorf("failed to copy calendar data: %w", err)
+ }
re := regexp.MustCompile("MAILTO:(.+@)")
str := re.ReplaceAllString(sb.String(), "mailto:${1}")