Skip to content

fix: skip events of unknown folders instead of crashing - #18

Closed
usefulish wants to merge 1 commit into
desbma:masterfrom
usefulish:pr/unknown-folder-id
Closed

usefulish wants to merge 1 commit into
desbma:masterfrom
usefulish:pr/unknown-folder-id

Conversation

@usefulish

Copy link
Copy Markdown
Contributor

An event referencing a folder id absent from the folder map crashes the daemon via expect(). This is reachable in normal use: remove a folder from Syncthing while events for it are buffered — the ConfigSaved-triggered reconnect rebuilds the folder map, then the cursor resume replays the in-flight events, which now reference an unknown id. Skip such events with a warning instead.

Test covers all three event conversion sites, and fails against the previous code.

🤖 Generated with Claude Code

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@desbma

desbma commented Aug 7, 2026

Copy link
Copy Markdown
Owner

There was indeed a bug here, but I fixed it a bit differently to avoid losing events, see 4de2462.

@desbma desbma closed this Aug 7, 2026
@usefulish
usefulish deleted the pr/unknown-folder-id branch August 7, 2026 22:33
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.

2 participants