Use hidden file for locking

This commit is contained in:
Unrud 2016-06-10 00:41:37 +02:00 committed by Unrud
parent 3479e76690
commit 39379413d1

View File

@ -576,7 +576,7 @@ class Collection(BaseCollection):
cls.configuration.get("storage", "filesystem_folder")) cls.configuration.get("storage", "filesystem_folder"))
if not os.path.exists(folder): if not os.path.exists(folder):
os.makedirs(folder, exist_ok=True) os.makedirs(folder, exist_ok=True)
lock_path = os.path.join(folder, "Radicale.lock") lock_path = os.path.join(folder, ".Radicale.lock")
cls._lock_file = open(lock_path, "w+") cls._lock_file = open(lock_path, "w+")
# set access rights to a necessary minimum to prevent locking # set access rights to a necessary minimum to prevent locking
# by arbitrary users # by arbitrary users