Skip to content

fix: avoid panic when filesystem watcher hits permission errors#2929

Open
leno23 wants to merge 1 commit into
gitui-org:masterfrom
leno23:fix/watcher-permission-denied-2900
Open

fix: avoid panic when filesystem watcher hits permission errors#2929
leno23 wants to merge 1 commit into
gitui-org:masterfrom
leno23:fix/watcher-permission-denied-2900

Conversation

@leno23
Copy link
Copy Markdown

@leno23 leno23 commented May 17, 2026

Summary

  • Replace expect calls in the notify watcher setup with error handling.
  • When watch setup fails (e.g. permission denied on a subdirectory owned by another user), log a warning and continue without file notifications instead of panicking.
  • Log debouncer errors in the forwarder loop instead of ignoring the Err variant.

Test plan

Fixes #2900

Made with Cursor

Log and disable notify-based updates instead of panicking when the
watcher cannot be created or cannot recurse into permission-denied
directories (e.g. podman-owned folders with --watcher).

Fixes gitui-org#2900

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GitUI was close due to an unexpected panic (file: "src/watcher.rs")

1 participant