Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
lib/model: Return empty summary on paused folders (ref #6272) #6326
This now actually addresses the 404 on the rest api that makes trouble for SyncTrayzor (https://forum.syncthing.net/t/rest-db-status-returns-404-on-startup/14329). The behaviour is, that we return an empty folder summary in that case. I think that's not a good API and instead the folder summary service should have access to the db for paused folders as well (e.g. global and local state are still useful info then), but that's a much bigger change. This just makes sure the behaviour doesn't change.
I didn't add a rest api error, as it can't use the model package. However I added a test in the model that makes sure that no error is returned when getting a folder summary for a paused folder.