|
@@ -32,8 +32,9 @@ class SQLiteBackend:
|
|
|
@classmethod
|
|
@classmethod
|
|
|
def from_store_config(cls, store_cfg, calendar_name: str) -> 'SQLiteBackend':
|
|
def from_store_config(cls, store_cfg, calendar_name: str) -> 'SQLiteBackend':
|
|
|
from room_cal._utils import data_home
|
|
from room_cal._utils import data_home
|
|
|
- db_path_str = store_cfg.sqlite.db_path
|
|
|
|
|
- db_path = Path(db_path_str) if db_path_str else data_home() / 'store.db'
|
|
|
|
|
|
|
+ db_path = Path(store_cfg.sqlite.db_path)
|
|
|
|
|
+ if not db_path.is_absolute():
|
|
|
|
|
+ db_path = data_home() / db_path
|
|
|
return cls(db_path, calendar_name)
|
|
return cls(db_path, calendar_name)
|
|
|
|
|
|
|
|
def _to_record(self, row) -> EventRecord:
|
|
def _to_record(self, row) -> EventRecord:
|