After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 761498 - metadata-manager: first key/value set is lost
metadata-manager: first key/value set is lost
Status: RESOLVED FIXED
Product: gedit
Classification: Applications
Component: file loading and saving
3.19.x
Other All
: Normal normal
: ---
Assigned To: Gedit maintainers
Gedit maintainers
Depends on:
Blocks:
 
 
Reported: 2016-02-03 12:54 UTC by Sébastien Wilmet
Modified: 2016-02-05 20:26 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Sébastien Wilmet 2016-02-03 12:54:26 UTC
If the cache metadata file doesn't exist yet, and if the set() function is called first (before get()), the key/value isn't saved.

So a code like:
gedit_metadata_manager_init (...);
gedit_metadata_manager_set (...);

The problem is located in this code in set():

> if (!gedit_metadata_manager->values_loaded)
> {
>        gboolean res;
>
>        res = load_values ();
>
>        if (!res)
>               return;
> }

load_values() returns FALSE if the file doesn't exist.
Comment 1 Sébastien Wilmet 2016-02-05 09:46:13 UTC
Fixed, I'll push the commit soon (when I'm on my personal computer).