Revert "Try to use UID as filename"
This reverts commit 0b25c82d9d
.
See #419.
This commit is contained in:
parent
f1f716b0c7
commit
063e827588
@ -380,25 +380,12 @@ class Collection(BaseCollection):
|
|||||||
for oitem in items[i+1:]:
|
for oitem in items[i+1:]:
|
||||||
if getattr(oitem, "uid", None) == uid:
|
if getattr(oitem, "uid", None) == uid:
|
||||||
new_collection.add(oitem)
|
new_collection.add(oitem)
|
||||||
if uid and is_safe_filesystem_path_component(uid.value):
|
self.upload(uuid4().hex, new_collection)
|
||||||
href = uid.value
|
|
||||||
else:
|
|
||||||
href = uuid4().hex
|
|
||||||
if not href.lower().endswith(".ics"):
|
|
||||||
href += ".ics"
|
|
||||||
self.upload(href, new_collection)
|
|
||||||
elif tag == "VCARD":
|
elif tag == "VCARD":
|
||||||
self.set_meta("tag", "VADDRESSBOOK")
|
self.set_meta("tag", "VADDRESSBOOK")
|
||||||
if collection:
|
if collection:
|
||||||
for card in collection:
|
for card in collection:
|
||||||
uid = getattr(card, "uid", None)
|
self.upload(uuid4().hex, card)
|
||||||
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)
|
|
||||||
return self
|
return self
|
||||||
|
|
||||||
def list(self):
|
def list(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user