GNOME Bugzilla – Bug 671817
GTK+ doesn't create ~/.local/share (path) and ~/.local/share/recently-used.xbel
Last modified: 2012-07-11 11:30:49 UTC
GTK+ doesn't create ~/.local/share which it wants for ~/.local/share/recently-used.xbel. Related (about LXDE): https://bugs.mageia.org/show_bug.cgi?id=2781 From reading http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html, it seeems to suggest that whatever wants to use a file there should create it. The exception is XDG_RUNTIME_DIR; that somehow has to exist already. Warning messages from programs (apologies for the French; I don't have the English translation for this): (xarchiver:4801): Gtk-WARNING **: Attempting to store changes into `/home/jacques/.local/share/recently-used.xbel', but failed: La création du fichier « /home/jacques/.local/share/recently-used.xbel.RVK61V » a échoué : Aucun fichier ou dossier de ce type (xarchiver:4801): Gtk-WARNING **: Attempting to set the permissions of `/home/jacques/.local/share/recently-used.xbel', but failed: Aucun fichier ou dossier de ce type [jacques@localhost ~]$
ping?
I just observed that in the Debian/Ubuntu GTK+ packages, as I am now letting the build fail on test failures, so confirming: root@donald:/tmp/buildd/gtk+3.0-3.5.6/debian/build/shared/gtk/tests# ./recentmanager /recent-manager/get-default: OK /recent-manager/add: OK /recent-manager/add-many: (/tmp/buildd/gtk+3.0-3.5.6/debian/build/shared/gtk/tests/.libs/lt-recentmanager:17163): Gtk-WARNING **: Attempting to store changes into `/tmp/buildd/gtk+3.0-3.5.6/debian/build/.local/share/recently-used.xbel', but failed: Failed to create file '/tmp/buildd/gtk+3.0-3.5.6/debian/build/.local/share/recently-used.xbel.7P51GW': No such file or directory
Created attachment 218005 [details] [review] Ensure that XDG_DATA_HOME is created before using it The recently-used.xbel storage for recently used files is located inside the $XDG_DATA_HOME directory; there's no actual guarantee that the directory has been created already, even though it's very highly probable on any modern distribution. We should create it, along with its intermediate parents, before constructing the file monitor that we use to get change notifications.
Review of attachment 218005 [details] [review]: Looks fine to me
The following fix has been pushed: adf853b Ensure that XDG_DATA_HOME is created before using it