mirror of
https://git.hiabuto.net/C3MA/CCMA.git
synced 2026-09-06 03:20:49 +02:00
Keep CCMA usable when the member store is mounted read-only
The encrypted volume holding the member data can be mounted without write access, but starting against such a store failed: the housekeeper takes a lock file before doing anything, so its startup pass died with a PermissionError and took the whole start with it. The store is now probed with an actual write once at startup -- permissions, mount options and filesystem state all matter, and only an attempt covers them together -- and a read-only store opens as a read-only session. The housekeeper is skipped rather than attempted, every write inside the repository goes through one guard that reports ReadOnlyStoreError (a RepositoryError, so the dialogs already handle it) instead of letting an OS error surface, and the services that archive into the member file check before they start sending or rendering. The session says so permanently: a warning banner above the tabs, "NUR LESEN" in the window title and status bar, and refused actions explaining why. Program settings still save -- they live in the user's config directory -- while the store-backed ones are skipped with a notice. "Erneut prüfen" picks up a volume that was remounted writable without restarting. A store that was never initialized still fails, but says that creating one needs write access. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
1972dbabb3
commit
be042949a2
@@ -121,7 +121,14 @@ class SplashScreen(tk.Toplevel):
|
||||
self.repository.list_members()
|
||||
member_count = len(self.repository.list_member_ids())
|
||||
findings = []
|
||||
if self.run_housekeeper:
|
||||
# A read-only store makes the housekeeper impossible, not just
|
||||
# unwanted: every one of its passes writes. Skipping it keeps the
|
||||
# rest of the startup -- and the whole read-only session -- working.
|
||||
if self.repository.read_only:
|
||||
self._messages.put(
|
||||
("status", "Store ist schreibgeschützt – Hausmeister übersprungen …")
|
||||
)
|
||||
elif self.run_housekeeper:
|
||||
self._messages.put(("status", "Starte Hausmeister …"))
|
||||
findings = Housekeeper(self.repository, self.housekeeper_settings).run(
|
||||
member_delay=_member_delay_for_splash(
|
||||
|
||||
Reference in New Issue
Block a user