You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The no-op guard in Editor.commit() compares filtered_data against
preferences.data and skips the file write if they match. But any code
that got a mutable reference via get_dict()/get_list(), mutated it,
then created an Editor had already mutated preferences.data in-place
before the Editor's deep-copy — so the guard always saw equality and
never wrote to disk. This affected ALL preferences, not just WiFi.
Fixes:
- config.py: get_dict() and get_list() now return copies so that
accidental mutation doesn't corrupt prefs.data before the Editor
snapshot.
- wifi_service.py: use editor.put_dict_item() / remove_dict_item()
to operate on the Editor's deep copy instead.
- testing/mocks.py: add put_dict_item() / remove_dict_item() to
MockEditor for test compatibility.
- tests: add regression tests for the
get_dict -> mutate -> edit -> commit pattern.
0 commit comments