mirror of
https://github.com/Kozea/Radicale.git
synced 2025-08-07 18:30:54 +00:00
Clean the user's collection creation code
This commit is contained in:
parent
04010ff8d3
commit
d322d3f394
2 changed files with 11 additions and 13 deletions
|
@ -407,11 +407,14 @@ class Collection(BaseCollection):
|
|||
folder = os.path.expanduser(
|
||||
cls.configuration.get("storage", "filesystem_folder"))
|
||||
path = path_to_filesystem(folder, href)
|
||||
if not os.path.exists(path):
|
||||
|
||||
self = cls(href)
|
||||
if os.path.exists(path):
|
||||
return self
|
||||
else:
|
||||
os.makedirs(path)
|
||||
if not tag and collection:
|
||||
tag = collection[0].name
|
||||
self = cls(href)
|
||||
|
||||
if tag == "VCALENDAR":
|
||||
self.set_meta("tag", "VCALENDAR")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue