Repository navigation
fix(ui): log a folder emblem failure once and stop retrying when unsupported - #343
Merged
Merged
Conversation
…pported Inside the Flatpak sandbox there is no gvfs metadata daemon, so every emblem write fails with "setting the metadata::emblems attribute is not supported". The state subscription fires on each change, so the same line filled the daily log with a harmless failure. The subscription now stops writing emblems for that folder after such a failure and logs it once. Other failures (permissions, missing folder) still retry, because they can go away, but they are also logged only once per folder so a transient error cannot flood the log either. `emblems_unsupported` matches on the reported message, with tests for the verbatim sandbox message and for lookalikes that must not be taken for it. Closes #342
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #342. Inside the Flatpak sandbox the gvfs metadata daemon is absent, so
set_folder_emblemfails on every write withsetting the metadata::emblems attribute is not supported, and the state subscription fires on each change. The daily log filled with that line.Now the subscription keeps two flags per folder: after an "unsupported" failure it stops writing emblems for that folder, and any failure is logged only once instead of on every state change. Truly transient failures (permissions, folder gone) still retry, so the emblem comes back if the cause disappears.
emblems_unsupported(message: &str)decides from the reported message, and has tests for the verbatim sandbox message plus lookalikes that must not be classified as unsupported (permission denied on the same attribute, a plain missing file).Gates:
cargo fmt --check,cargo clippy --all-targets -- -D warnings, and the full suite under Xvfb: 722 + 44 + 27 + 3 tests passing, 0 failures.