use proper cache location for lock
This commit is contained in:
@@ -38,10 +38,11 @@ class CollectionPartLock(CollectionBase):
|
|||||||
if self._storage._lock.locked == "w":
|
if self._storage._lock.locked == "w":
|
||||||
yield
|
yield
|
||||||
return
|
return
|
||||||
cache_folder = os.path.join(self._filesystem_path, ".Radicale.cache")
|
cache_folder = self._storage._get_collection_cache_subfolder(self._filesystem_path, ".Radicale.cache", ns)
|
||||||
self._storage._makedirs_synced(cache_folder)
|
self._storage._makedirs_synced(cache_folder)
|
||||||
lock_path = os.path.join(cache_folder,
|
lock_path = os.path.join(cache_folder,
|
||||||
".Radicale.lock" + (".%s" % ns if ns else ""))
|
".Radicale.lock" + (".%s" % ns if ns else ""))
|
||||||
|
logger.debug("Lock file (CollectionPartLock): %r" % lock_path)
|
||||||
lock = pathutils.RwLock(lock_path)
|
lock = pathutils.RwLock(lock_path)
|
||||||
with lock.acquire("w"):
|
with lock.acquire("w"):
|
||||||
yield
|
yield
|
||||||
|
|||||||
Reference in New Issue
Block a user