GNOME Bugzilla – Bug 625761
Folder views not preserved after migration
Last modified: 2013-09-13 01:03:37 UTC
After moving to xdg base directories folder view settings are missing. eg. no sort by date, no last mail message selected.
Created attachment 166931 [details] [review] rename view filenames mail/views directory is not properly migrated. Views files encodes mail folder path in it's filename so we also need to properly rename those files when moving to the XDG directories. Otherwise the old files are useless and changing view settings will result in a new file created. There are several ways to fix this however the simplest way is to replace old_base_dir with new_base_dir in filename while renaming.
Another good catch! Please commit.
Created attachment 166953 [details] [review] fix view and config directory migration I found more issues with my previous patch. 1. before rename, we have to test for old_base_dir in file name, we could have view files that does not necessarily have to contain old_basedir (eg. custom_view-nntp:__@server-folder.xml) 2. the same migration procedure applies for old mail/config directory regarding et-expanded-* files - since there is no point in opening another bug just for that, I updated my patch accordingly. 3. do not reallocate old_base_dir and new_base_dir over the while loop, free both after use. 4. also free contents of result string
I tweaked the patch a little bit, but the logic itself was correct. Thanks again for this. Committing it myself so it makes the release. http://git.gnome.org/browse/evolution/commit/?id=e919c9724f612270053683ad110ffd68de135c60