bilelmoussaoui / oo7

James Bond went on a new mission as a Secret Service provider
https://bilelmoussaoui.github.io/oo7/oo7/
MIT License
57 stars 11 forks source link

`oo7::Item::set_attributes()` with the file backend creates a new item #97

Closed zecakeh closed 1 week ago

zecakeh commented 1 week ago

The reason to call that method should be to update the attributes of an existing item.

However, for the file backend, that method calls Keyring::create_item() with replace: true, that only replaces items with the same attributes, so if the attributes changed (which is usually the case) a new item is created.

Maybe the implementation should be changed to use Keyring::replace_item_index() instead?