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 669097 - Cannot save column setup: File name too long
Cannot save column setup: File name too long
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Mailer
3.2.x (obsolete)
Other Linux
: Normal major
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2012-01-31 08:46 UTC by Milan Crha
Modified: 2012-02-15 16:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
evo patch (3.80 KB, patch)
2012-02-13 18:21 UTC, Milan Crha
committed Details | Review

Description Milan Crha 2012-01-31 08:46:13 UTC
Moving this from a downstream bug report:
https://bugzilla.redhat.com/show_bug.cgi?id=781447

Evolution couldn't remember mail sort ordering and visibility columns

> (evolution:5860): menus-WARNING **: Unable to save view to
> /home/user/.config/evolution/mail/views/current_view-
> folder:__1323840999.1759.2_40localhost.localdomain__d0_9f_d0_be_d1_87_d1_82
> _d0_be_d0_b2_d1_8b_d0_b9_20_d1_8f_d1_89_d0_b8_d0_ba_20-
> _20_d0_93_d0_b0_d0_b2_d1_80_d0_b8_d0_bb_d0_be_d0_b2_20_d0_9c_d0_b8_d1_85
> _d0_b0_d0_b8_d0_bb_20_d0_92_d0_b8_d1_82_d0_b0_d0_bb_d1_8c_d0_b5_d0_b2_d0
> _b8_d1_87_Inbox.xml - File name too long

----------------------------------------------------------------------------

After some investigation it turned out that this is a MAPI account, and the English term "Mailbox - User Name" is here in Russian, which means quite many UTF8 letters, which are encoded in the folder's URI, making the string quite long.
Comment 1 Milan Crha 2012-01-31 08:51:44 UTC
I would use one XML file for view definitions per account, and have there nodes by folders, which will contain the same information like current view definitions. This way the file name will be always short enough and there will be no limitations on folder structure deepness.
Comment 2 Milan Crha 2012-02-13 18:21:57 UTC
Created attachment 207473 [details] [review]
evo patch

for evolution;

I realized that the idea of one XML file for each account is not possible, thus I decided to store views with an MD5 checksum of the folder URI. file names are much shorter and they do not depends on the folder URI length, which is a plus, I believe.
Comment 3 Milan Crha 2012-02-13 18:24:21 UTC
Created commit 86e3ff6 in evo master (3.3.90+)
Comment 4 Mikhail 2012-02-15 11:12:22 UTC
I think much better using in filename UUID than MD5 :) Because hash functions have collisions.
Comment 5 Milan Crha 2012-02-15 16:20:30 UTC
The MD5 has, that's true, but not on regular data, like folder names. Also, you want at least 2 chunks to generate a collision, and if I recall correctly, it's about 512 bytes, which is more than MAXPATH already :)

The SHA1 (and higher) doesn't have found collision algorithm yet, as far as I know, and I didn't want too long file name, thus I decided to use MD5, which has reasonably short result.

Also, UUID is about generating unique "numbers", while the hash generates always same value for the same input, this is the advantage of it here.