Split BaseCollection into BaseStorage and BaseCollection

This commit is contained in:
Unrud
2020-01-14 06:19:23 +01:00
parent 1453c0b72c
commit 040d8c0fff
15 changed files with 221 additions and 213 deletions

View File

@@ -52,7 +52,7 @@ class CollectionUploadMixin:
"""
cache_folder = os.path.join(self._filesystem_path,
".Radicale.cache", "item")
self._makedirs_synced(cache_folder)
self._storage._makedirs_synced(cache_folder)
hrefs = set()
for item in items:
uid = item.uid
@@ -101,5 +101,5 @@ class CollectionUploadMixin:
with self._atomic_write(os.path.join(cache_folder, href), "wb",
sync_directory=False) as f:
pickle.dump(cache_content, f)
self._sync_directory(cache_folder)
self._sync_directory(self._filesystem_path)
self._storage._sync_directory(cache_folder)
self._storage._sync_directory(self._filesystem_path)