Problem
GetMeshdFiles in internal/syncthing/client.go fetches the need-to-sync list with a hardcoded limit:
c.get("/rest/db/need?folder="+MeshdFolderID+"&perpage=1000", &need)
If ~/meshd contains more than 1000 files needing sync, the extras are silently missing from needSet, so they show as InSync: true in the TUI and MCP list_files output when they're actually not in sync.
Fix
Either:
- Paginate through all pages using
page + perpage until the result is exhausted, or
- Use a much larger value (e.g. 100000) with a comment explaining the trade-off, or
- Add a
page/perpage parameter to GetMeshdFiles so callers can control it
Option 1 is most correct. Option 2 is an acceptable short-term fix.
Problem
GetMeshdFilesininternal/syncthing/client.gofetches the need-to-sync list with a hardcoded limit:If
~/meshdcontains more than 1000 files needing sync, the extras are silently missing fromneedSet, so they show asInSync: truein the TUI and MCPlist_filesoutput when they're actually not in sync.Fix
Either:
page+perpageuntil the result is exhausted, orpage/perpageparameter toGetMeshdFilesso callers can control itOption 1 is most correct. Option 2 is an acceptable short-term fix.