This commit is contained in:
2026-08-29 19:16:12 +02:00
parent f463c01f0f
commit be47d6844c
6 changed files with 138 additions and 13 deletions
+3 -3
View File
@@ -74,7 +74,7 @@ func (b *Backend) ListAddressBooks(ctx context.Context) ([]carddav.AddressBook,
var books []carddav.AddressBook
for _, name := range names {
if err := b.store.EnsureCollection(p.Username, "card-"+name); err != nil {
if err := b.store.EnsureCollection(p.Username, "col/addressbooks/"+name); err != nil {
b.logger.Warn("ensuring address book directory", "book", name, "error", err)
continue
}
@@ -88,8 +88,8 @@ func (b *Backend) ListAddressBooks(ctx context.Context) ([]carddav.AddressBook,
configured["card-"+n] = true
}
for _, dir := range disk {
if strings.HasPrefix(dir, "card-") && !configured[dir] {
name := strings.TrimPrefix(dir, "card-")
if strings.HasPrefix(dir, "col/addressbooks/") && !configured[dir] {
name := strings.TrimPrefix(dir, "col/addressbooks/")
books = append(books, b.bookMeta(p.Username, name, name))
}
}