diff options
author | Iain Holmes <iain@src.gnome.org> | 2001-10-13 08:26:34 +0800 |
---|---|---|
committer | Iain Holmes <iain@src.gnome.org> | 2001-10-13 08:26:34 +0800 |
commit | 5a9173f1b76a95314e421eb5d0d2da805af8c311 (patch) | |
tree | cc04511d9cded828eb42722eb7b1ac519cc73e06 | |
parent | 516c4d55130fef0bae50da7e665ca3676a3b9124 (diff) | |
download | gsoc2013-evolution-5a9173f1b76a95314e421eb5d0d2da805af8c311.tar gsoc2013-evolution-5a9173f1b76a95314e421eb5d0d2da805af8c311.tar.gz gsoc2013-evolution-5a9173f1b76a95314e421eb5d0d2da805af8c311.tar.bz2 gsoc2013-evolution-5a9173f1b76a95314e421eb5d0d2da805af8c311.tar.lz gsoc2013-evolution-5a9173f1b76a95314e421eb5d0d2da805af8c311.tar.xz gsoc2013-evolution-5a9173f1b76a95314e421eb5d0d2da805af8c311.tar.zst gsoc2013-evolution-5a9173f1b76a95314e421eb5d0d2da805af8c311.zip |
Fix race conditions in creating folders
svn path=/trunk/; revision=13645
-rw-r--r-- | mail/ChangeLog | 7 | ||||
-rw-r--r-- | mail/importers/evolution-mbox-importer.c | 7 |
2 files changed, 12 insertions, 2 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index a1e053202d..5ac7fbdbda 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,10 @@ +2001-10-12 Iain Holmes <iain@ximian.com> + + * importers/evolution-mbox-importer.c (load_file_fn): Don't ever create + the folder here. Wait until the shell has created it. Otherwise we get + loads of race conditions where the mailer can create a subfolder before + the shell has registered the parent. + 2001-10-12 Chris Toshok <toshok@ximian.com> * main.c (main): call e_passwords_init and e_passwords_shutdown. diff --git a/mail/importers/evolution-mbox-importer.c b/mail/importers/evolution-mbox-importer.c index 9cdf6fa732..74bef6091f 100644 --- a/mail/importers/evolution-mbox-importer.c +++ b/mail/importers/evolution-mbox-importer.c @@ -205,7 +205,6 @@ folder_created_cb (BonoboListener *listener, ex = camel_exception_new (); importer->folder = mail_tool_uri_to_folder (fullpath, CAMEL_STORE_FOLDER_CREATE, ex); - if (camel_exception_is_set (ex)) { g_warning ("Error opening %s", fullpath); camel_exception_free (ex); @@ -214,6 +213,9 @@ folder_created_cb (BonoboListener *listener, return; } + camel_importer_freeze (importer->folder); + importer->frozen = TRUE; + g_free (fullpath); bonobo_object_unref (BONOBO_OBJECT (listener)); } @@ -291,7 +293,8 @@ load_file_fn (EvolutionImporter *eimporter, mail_importer_create_folder (parent, name, NULL, listener); camel_exception_free (ex); ex = camel_exception_new (); - importer->folder = mail_tool_uri_to_folder (fullpath, CAMEL_STORE_FOLDER_CREATE, ex); + importer->folder = NULL; + g_print ("No folder yet\n"); delayed = TRUE; g_free (parent); } |