From 6f80c4e95604a5150d9505205a00549cdf221421 Mon Sep 17 00:00:00 2001 From: Max Berger Date: Sat, 28 Feb 2026 14:28:42 +0100 Subject: [PATCH] Bugfix: Set folder_db for csv database This fixes the error message: [ERROR] sharing database cannot be initialized: UnboundLocalError("cannot access local variable 'folder_db' where it is not associated with a value") --- radicale/sharing/csv.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/radicale/sharing/csv.py b/radicale/sharing/csv.py index 1723c495..543a123b 100644 --- a/radicale/sharing/csv.py +++ b/radicale/sharing/csv.py @@ -40,6 +40,8 @@ class Sharing(sharing.BaseSharing): sharing_db_file = os.path.join(folder_db, "sharing.csv") logger.info("sharing database filename not provided, use default: %r", sharing_db_file) else: + sharing_db_file = os.path.abspath(sharing_db_file) + folder_db = os.path.dirname(sharing_db_file) logger.info("sharing database filename: %r", sharing_db_file) if not os.path.exists(folder_db):