From 058c06381953942e65fb37725ee6de42b19e2ff0 Mon Sep 17 00:00:00 2001 From: Conrad Hoffmann Date: Fri, 28 Oct 2022 19:41:44 +0200 Subject: [PATCH] Fix errors introduced in previous commit :/ --- storage/filesystem.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/storage/filesystem.go b/storage/filesystem.go index 53f3882..ee46863 100644 --- a/storage/filesystem.go +++ b/storage/filesystem.go @@ -249,7 +249,7 @@ func (b *filesystemBackend) AddressBook(ctx context.Context) (*carddav.AddressBo data, readErr = ioutil.ReadFile(path) } if readErr != nil { - return nil, fmt.Errorf("error opening address book: %s", err.Error()) + return nil, fmt.Errorf("error opening address book: %s", readErr.Error()) } var addressBook carddav.AddressBook err = json.Unmarshal(data, &addressBook) @@ -493,7 +493,7 @@ func (b *filesystemBackend) Calendar(ctx context.Context) (*caldav.Calendar, err debug.Printf("loading calendar from %s", path) data, readErr := ioutil.ReadFile(path) - if os.IsNotExist(err) { + if os.IsNotExist(readErr) { homeSetPath, err := b.CalendarHomeSetPath(ctx) if err != nil { return nil, err @@ -506,7 +506,7 @@ func (b *filesystemBackend) Calendar(ctx context.Context) (*caldav.Calendar, err data, readErr = ioutil.ReadFile(path) } if readErr != nil { - return nil, fmt.Errorf("error opening calendar: %s", err.Error()) + return nil, fmt.Errorf("error opening calendar: %s", readErr.Error()) } var calendar caldav.Calendar err = json.Unmarshal(data, &calendar)