[Xfce4-commits] <postler:master> Failure in one message shouldn't stop all indexing

Christian Dywan noreply at xfce.org
Sun May 29 04:46:03 CEST 2011


Updating branch refs/heads/master
         to 94cff9dd02321d3aadfa9311e8acd48193db5eb8 (commit)
       from 98364a87b11484d908c3a64d5ca88a152a341a75 (commit)

commit 94cff9dd02321d3aadfa9311e8acd48193db5eb8
Author: Christian Dywan <christian at twotoasts.de>
Date:   Sat May 28 16:56:15 2011 +0200

    Failure in one message shouldn't stop all indexing

 postler/postler-service.vala |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/postler/postler-service.vala b/postler/postler-service.vala
index a4164eb..cd8a480 100644
--- a/postler/postler-service.vala
+++ b/postler/postler-service.vala
@@ -185,8 +185,14 @@ namespace Postler {
                 foreach (var info in files) {
                     var file = folder.resolve_relative_path (info.get_name ());
                     if (index.count_messages (file.get_uri ()) < 1) {
-                        var message = new Message.from_file (file);
-                        index.insert_received_message (message);
+                        try {
+                            var message = new Message.from_file (file);
+                            index.insert_received_message (message);
+                        }
+                        catch (GLib.Error error) {
+                            GLib.warning (_("Failed to index message \"%s\": %s"),
+                                          file.get_path (), error.message);
+                        }
                     }
                 }
             }



More information about the Xfce4-commits mailing list