carddav: fix accidental shadowing of variables

The statement changed here creates new variables, whereas it means to
assign values to the previously declared `ao` to be used outside of the
if statement. This lead to PUT requests always being sent to a URL
containing a new UUID, causing problems with some CardDAV servers.
This commit is contained in:
Conrad Hoffmann 2022-03-01 11:04:31 +01:00 committed by Simon Ser
parent 9553724c82
commit f4523b51af
1 changed files with 1 additions and 1 deletions

View File

@ -141,7 +141,7 @@ func registerRoutes(p *plugin) {
var ao *carddav.AddressObject
var card vcard.Card
if addressObjectPath != "" {
ao, err := c.GetAddressObject(addressObjectPath)
ao, err = c.GetAddressObject(addressObjectPath)
if err != nil {
return fmt.Errorf("failed to query CardDAV address: %v", err)
}