Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
delete resource via API does not delete resource from sync target #1694
I've just noticed that the API command to delete resources does not delete the resources from the sync target. Only the meta data files are deleted from the sync target.
This is the command I used:
sort of unrelated, but this doesn't happen for regular usage either, like there is no way to tell joplin that a resource is 'deleted' i guess in regular use (not using the API) so if you remove all references to a resource, it just hangs around forever
i feel that it might be desired behavior to keep them around in normal use, in which case i feel like a UI to show what resources exist and maybe a filter for 'orphaned' ones where you can choose which ones to delete, rename, etc, would be useful
There was indeed a bug here. It wasn't about the API, but the synchronizer simply didn't delete resource data from the sync target, and has never done so. I can't believe I missed that, and that no-one ever noticed till today.
For good measure, I've also added a test for the API to make sure local data is deleted. For remote data, I've added the test to the synchronizer test units.