diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 2001-04-04 00:57:27 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 2001-04-04 00:57:27 +0800 |
commit | d5dc15ddf0ff2a0e5a08887f740d6e009de1024a (patch) | |
tree | c091c4e519824cd2fa2c7d00a60a382899b648ba /shell/e-setup.c | |
parent | 2a49ef6020c589c05ab30deb10165059b39db1a1 (diff) | |
download | gsoc2013-evolution-d5dc15ddf0ff2a0e5a08887f740d6e009de1024a.tar.gz gsoc2013-evolution-d5dc15ddf0ff2a0e5a08887f740d6e009de1024a.tar.zst gsoc2013-evolution-d5dc15ddf0ff2a0e5a08887f740d6e009de1024a.zip |
Pulled up fixes from evolution-0-10-branch.
svn path=/trunk/; revision=9133
Diffstat (limited to 'shell/e-setup.c')
-rw-r--r-- | shell/e-setup.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/shell/e-setup.c b/shell/e-setup.c index 867aa73d2f..1d6e75b71e 100644 --- a/shell/e-setup.c +++ b/shell/e-setup.c @@ -40,6 +40,8 @@ #include <libgnomeui/gnome-stock.h> #include <gal/widgets/e-gui-utils.h> +#include "e-local-folder.h" + #include "e-setup.h" @@ -278,12 +280,33 @@ e_setup (const char *evolution_directory) file = g_strdup_printf ("%s/config", evolution_directory); if (stat (file, &statinfo) == 0 && ! S_ISDIR (statinfo.st_mode)) { char *old = g_strdup_printf ("%s.old", file); + rename (file, old); mkdir (file, 0700); g_free (old); } g_free (file); + /* If the user has an old style trash folder, remove it so it gets + * replaced by the new vfolder-based trash folder. FIXME: This should + * go away at some point. */ + file = g_strdup_printf ("%s/local/Trash", evolution_directory); + if (stat (file, &statinfo) == 0 && S_ISDIR (statinfo.st_mode)) { + EFolder *local_folder; + + local_folder = e_local_folder_new_from_path (file); + if (local_folder != NULL + && strcmp (e_folder_get_type_string (local_folder), "mail") == 0) { + char *old = g_strdup_printf ("%s.old", file); + + rename (file, old); + g_free (old); + } + + gtk_object_unref (GTK_OBJECT (local_folder)); + } + g_free (file); + /* User has evolution directory... Check if it is up to date. */ return check_evolution_directory (evolution_directory); |