GNOME Bugzilla – Bug 669097
Cannot save column setup: File name too long
Last modified: 2012-02-15 16:20:30 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.
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.
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.
Created commit 86e3ff6 in evo master (3.3.90+)
I think much better using in filename UUID than MD5 :) Because hash functions have collisions.
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.