From 063e8275882490d59d1d88787ca648eba1288d68 Mon Sep 17 00:00:00 2001 From: Guillaume Ayoub Date: Mon, 30 May 2016 19:05:58 +0200 Subject: [PATCH] Revert "Try to use UID as filename" This reverts commit 0b25c82d9d7b9bba874470ba439fb4bae08eeb1b. See #419. --- radicale/storage.py | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/radicale/storage.py b/radicale/storage.py index b64e8132..1dd59a35 100644 --- a/radicale/storage.py +++ b/radicale/storage.py @@ -380,25 +380,12 @@ class Collection(BaseCollection): for oitem in items[i+1:]: if getattr(oitem, "uid", None) == uid: new_collection.add(oitem) - if uid and is_safe_filesystem_path_component(uid.value): - href = uid.value - else: - href = uuid4().hex - if not href.lower().endswith(".ics"): - href += ".ics" - self.upload(href, new_collection) + self.upload(uuid4().hex, new_collection) elif tag == "VCARD": self.set_meta("tag", "VADDRESSBOOK") if collection: for card in collection: - uid = getattr(card, "uid", None) - if uid and is_safe_filesystem_path_component(uid.value): - href = uid.value - else: - href = uuid4().hex - if not href.lower().endswith(".vcf"): - href += ".vcf" - self.upload(href, card) + self.upload(uuid4().hex, card) return self def list(self):