permission-store: Don't crash when deleting permissions
The permission store crashes when it attempts to remove the last entry of an specific table and id pair, e.g. "notifications", "notification", "a". The crash occurs due to the assumption that there should still be one entry left after the operation, but is not the case here. Prevent this by writing an empty entry for this specific table and id pair, instead. So that the specific pair is kept in the database. I assume this is the right thing to do, due to: 1. There's a separate API for deleting table and ids pairs. 2. The removal-related code already assumes that there should be at least one entry left after this operation. 3. It's what "flatpak permissions-reset --all" does. Closes #573
Loading
Please register or sign in to comment