1
0
Эх сурвалжийг харах

use proper cache location for lock

Peter Bieringer 10 сар өмнө
parent
commit
3ee5433397

+ 2 - 1
radicale/storage/multifilesystem/lock.py

@@ -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