GNOME Bugzilla – Bug 662590
File names for cached avatars too long
Last modified: 2011-10-25 23:34:57 UTC
Hardly any cached avatar is created because the resulting file names are too long. The file ~/.xsession-errors contains a long list of errors like: eds-WARNING **: edsf-persona.vala:1190: Couldn't cache avatar for Edsf.Persona 'eds:1319145214.3663.2@Khazad-dum:http\://www.google.com/m8/feeds/contacts/agebosma%40gmail.com/full/34665a9d0f79b916': Error opening file '/home/forage/.cache/folks/avatars/eds%3A1319145214.3663.2%40Khazad-dum%3Ahttp%5C%3A%2F%2Fwww.google.com%2Fm8%2Ffeeds%2Fcontacts%2Fagebosma%2540gmail.com%2Ffull%2F34665a9d0f79b916': File name too long
What architecture/operating system/distribution are you on? What file system is your home directory using? What're the values of your PATH_MAX and NAME_MAX (both defined in /usr/include/linux/limits.h)? That entire path is only 178 characters in length, which is shorter than the standard NAME_MAX of 255.
I'm running a clean install of Ubuntu 11.10 (x86) with GNOME Shell. The home folder is on an ext4 partition and only that folder is encrypted (default Ubuntu install procedure). NAME_MAX 255 PATH_MAX 4096
Ah, I guess you're using ecryptfs. It appears that ecryptfs mangles file names and makes them much longer by encrypting them, which pushes them over the 255 character limit. I don't think this is a bug in libfolks, really, since we're generating file names comfortably below NAME_MAX in length. I guess you have several options: • Ignore the problem. This will just mean that you can't see your contacts' avatars in GNOME Contacts when you're not online in Empathy. • Disable ecryptfs, or disable file name encryption (which I believe is possible without disabling encryption of the file contents themselves). This seems to be a relevant ecryptfs bug, which I'll consider as the real bug here: https://bugs.launchpad.net/ecryptfs/+bug/344878
Ah, darn, that's just stupid. A problem lying around for two and a half years and nothing has been done so far... Thanks for looking at the issue and finding the cause though. Just wondering: why is there so much info included in the file names of libfolks anyway? Wouldn't shorter file names be more efficient and manageable? :-D
(In reply to comment #4) > Just wondering: why is there so much info included in the file names of > libfolks anyway? Wouldn't shorter file names be more efficient and manageable? > :-D The file name of a cached avatar is (an escaped version of) the ID of the persona it belongs to. These IDs aren't short because they are built in a hierarchy out of (typically) several URIs.
Some people had reported a suspiciously-low number of cached avatars, but I couldn't reproduce it for any of my accounts. I wonder if this was the problem. Guillaume, if you still have this problem, are you using encryptfs as well?