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 671817 - GTK+ doesn't create ~/.local/share (path) and ~/.local/share/recently-used.xbel
GTK+ doesn't create ~/.local/share (path) and ~/.local/share/recently-used.xbel
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Class: GtkRecent
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
Emmanuele Bassi (:ebassi)
Depends on:
Blocks:
 
 
Reported: 2012-03-11 10:23 UTC by Olav Vitters
Modified: 2012-07-11 11:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Ensure that XDG_DATA_HOME is created before using it (1.49 KB, patch)
2012-07-04 10:46 UTC, Emmanuele Bassi (:ebassi)
accepted-commit_now Details | Review

Description Olav Vitters 2012-03-11 10:23:45 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 ~]$
Comment 1 Olav Vitters 2012-06-14 14:14:51 UTC
ping?
Comment 2 Martin Pitt 2012-07-04 10:32:04 UTC
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
Comment 3 Emmanuele Bassi (:ebassi) 2012-07-04 10:46:04 UTC
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.
Comment 4 Matthias Clasen 2012-07-05 20:09:43 UTC
Review of attachment 218005 [details] [review]:

Looks fine to me
Comment 5 Matthias Clasen 2012-07-11 11:30:49 UTC
The following fix has been pushed:
adf853b Ensure that XDG_DATA_HOME is created before using it