From d5dc15ddf0ff2a0e5a08887f740d6e009de1024a Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Tue, 3 Apr 2001 16:57:27 +0000 Subject: Pulled up fixes from evolution-0-10-branch. svn path=/trunk/; revision=9133 --- shell/e-setup.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'shell/e-setup.c') 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 #include +#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); -- cgit v1.2.3