Explorar o código

use proper cache location for lock

Peter Bieringer hai 10 meses
pai
achega
3ee5433397
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      radicale/storage/multifilesystem/lock.py

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

@@ -38,10 +38,11 @@ class CollectionPartLock(CollectionBase):
         if self._storage._lock.locked == "w":
             yield
             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)
         lock_path = os.path.join(cache_folder,
                                  ".Radicale.lock" + (".%s" % ns if ns else ""))
+        logger.debug("Lock file (CollectionPartLock): %r" % lock_path)
         lock = pathutils.RwLock(lock_path)
         with lock.acquire("w"):
             yield