mirror of
https://github.com/narrrl/proton-drive-linux.git
synced 2026-11-16 17:51:59 +01:00
feat(gui,core,cli): edit excluded files, open-with rules and the launcher in Preferences (#99)
Preferences gains two pages for the config.json settings that had no place in the app: - Sync: the patterns every synced folder leaves out (own patterns, and each built-in one on or off), and what the conflict sweep may do. - Apps: which program opens which kind of file (open_with), and how the search launcher opens (prompt). Each synced folder kept on this computer gets "Excluded Files…" in its menu for its own .pdfsignore: checked as typed, "Check a path" says which rule decides, and a version changed elsewhere is never written over without asking. `pdfs sync ignore list|add|remove|reset|check` does the same from a terminal, and `--page preferences-sync` (and -apps, -storage) opens Preferences at a page. Every writer of config.json now goes through AppDirs::update_config, which reads, changes and writes under an flock on config.json.lock, so the app, the tray and the daemon no longer undo each other's change (B292). The opener reads its rules on each open, so a new rule applies without a restart. The built-in ignore list also leaves out what Nextcloud, Dropbox and Syncthing leave out: desktop.ini, .directory, trash folders, NFS/FUSE leftovers, partial downloads, Kate swap and office lock files.
This commit is contained in:
1 parent
14b9e0fe64
commit
0df4b3c5f9
40 files changed
+8376
-3303
No files matched your search
@@ -306,6 +306,7 @@ a live account since.
|
||||
|
||||
| Entry | Title |
|
||||
|---|---|
|
||||
| [B292](#b292--two-programs-changing-settings-at-once-lose-one-of-the-changes) | Two programs changing settings at once lose one of the changes |
|
||||
| [B290](#b290--reopening-the-database-right-after-closing-it-can-be-refused-as-another-daemon) | Reopening the database right after closing it can be refused as another daemon |
|
||||
| [B276](#b276--a-stop-can-end-with-a-panic-in-a-thread-the-stop-never-waited-for) | A stop can end with a panic in a thread the stop never waited for |
|
||||
| [B258](#b258--journalctl--p-warning-shows-nothing-whatever-the-daemon-logged) | `journalctl -p warning` shows nothing, whatever the daemon logged |
|
||||
@@ -394,6 +395,34 @@ a live account since.
|
||||
|
||||
Newest first.
|
||||
|
||||
### B292 — Two programs changing settings at once lose one of the changes
|
||||
|
||||
**Status:** Fixed
|
||||
|
||||
**Found:** 2026-11-15, reading every writer of `config.json` while adding settings to Preferences.
|
||||
|
||||
**Where:** `crates/pdfs-core/src/config.rs`, `AppDirs::save_config` and its callers in the app,
|
||||
the tray and the daemon
|
||||
|
||||
**Repro:** Change the cache size in Preferences (the daemon writes `cache_budget`) while the app
|
||||
saves the window size or the tray hides itself. Both read the file before either wrote it, and
|
||||
the one that wrote last puts the other setting back. Not seen in the field; the window is a few
|
||||
milliseconds, but more settings in the app make it more likely.
|
||||
|
||||
**Cause:** Every writer loaded the file, changed one field and wrote the whole file back, with
|
||||
nothing ordering them. The atomic rename kept the file whole, not the changes.
|
||||
|
||||
**Fix:** `AppDirs::update_config` reads, changes and writes under an `flock` on
|
||||
`config.json.lock`, and every writer goes through it. It refuses an unreadable file before
|
||||
applying the change (B223). A lock held longer than 5 seconds is reported as an error instead of
|
||||
waited on.
|
||||
|
||||
**Verified:** `cargo test -p pdfs-core config::tests` on 2026-11-15,
|
||||
`concurrent_changes_to_different_settings_are_all_kept` and
|
||||
`a_change_is_never_applied_over_an_unreadable_config`.
|
||||
|
||||
---
|
||||
|
||||
### B291 — On Fedora 45's oo7, every saved sign-in is lost at the next reboot
|
||||
|
||||
**Status:** Fixed, not verified live
|
||||
|
||||
Reference in new issue
Block a user