Fix errors introduced in previous commit :/
This commit is contained in:
parent
b99f38a1b7
commit
058c063819
@ -249,7 +249,7 @@ func (b *filesystemBackend) AddressBook(ctx context.Context) (*carddav.AddressBo
|
|||||||
data, readErr = ioutil.ReadFile(path)
|
data, readErr = ioutil.ReadFile(path)
|
||||||
}
|
}
|
||||||
if readErr != nil {
|
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
|
var addressBook carddav.AddressBook
|
||||||
err = json.Unmarshal(data, &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)
|
debug.Printf("loading calendar from %s", path)
|
||||||
|
|
||||||
data, readErr := ioutil.ReadFile(path)
|
data, readErr := ioutil.ReadFile(path)
|
||||||
if os.IsNotExist(err) {
|
if os.IsNotExist(readErr) {
|
||||||
homeSetPath, err := b.CalendarHomeSetPath(ctx)
|
homeSetPath, err := b.CalendarHomeSetPath(ctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@ -506,7 +506,7 @@ func (b *filesystemBackend) Calendar(ctx context.Context) (*caldav.Calendar, err
|
|||||||
data, readErr = ioutil.ReadFile(path)
|
data, readErr = ioutil.ReadFile(path)
|
||||||
}
|
}
|
||||||
if readErr != nil {
|
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
|
var calendar caldav.Calendar
|
||||||
err = json.Unmarshal(data, &calendar)
|
err = json.Unmarshal(data, &calendar)
|
||||||
|
Loading…
Reference in New Issue
Block a user