From e31ea57883b51d0d3433ef364e6e16dc6528f994 Mon Sep 17 00:00:00 2001 From: Unrud Date: Thu, 25 Aug 2016 05:58:09 +0200 Subject: [PATCH] Use upload_all for addressbook --- radicale/storage.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/radicale/storage.py b/radicale/storage.py index 6a0523c..ef4fcfc 100644 --- a/radicale/storage.py +++ b/radicale/storage.py @@ -562,8 +562,11 @@ class Collection(BaseCollection): vobject_items[href] = new_collection self.upload_all(vobject_items) elif props.get("tag") == "VCARD": + vobject_items = {} for card in collection: - self.upload(self._find_available_file_name(self.has), card) + href = self._find_available_file_name(vobject_items.get) + vobject_items[href] = card + self.upload_all(vobject_items) # This operation is not atomic on the filesystem level but it's # very unlikely that one rename operations succeeds while the