Skip to content

bookmarkfile: Don't move an item if the uri has not changed

Marco Trevisan requested to merge 3v1n0/glib:bookmarkfile-self-move into master

This was causing a crash, because we were first removing an item, freeing both the instance itself and the key, and then trying to reuse those.

So, in this case, instead of reassigning an item, we can just return TRUE as we have already the item at the right place, while it's not needed to update the modified timestamp, since no modification happened in reality (but let me know if you think this should be different).

I've added a test, and since I was there, a commit to cleanup trailing spaces (tell me if you want me to drop it).

Fixes #1588 (closed)

Edited by Marco Trevisan

Merge request reports