[evolution] EMailBackend: Remove some nuisance runtime warnings.



commit 0157f6598b42a8343dd8ef3251917b0d28bdbfe1
Author: Matthew Barnes <mbarnes redhat com>
Date:   Wed Dec 11 11:24:24 2013 -0500

    EMailBackend: Remove some nuisance runtime warnings.
    
    Similar to the previous commit, when renaming a folder.

 mail/e-mail-backend.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/mail/e-mail-backend.c b/mail/e-mail-backend.c
index ff2b8c8..c4d5e8d 100644
--- a/mail/e-mail-backend.c
+++ b/mail/e-mail-backend.c
@@ -637,10 +637,12 @@ mail_backend_folder_renamed_cb (MailFolderCache *folder_cache,
                newname = mail_backend_uri_to_evname (new_uri, cachenames[ii]);
 
                /* Ignore errors; doesn't matter. */
-               if (g_rename (oldname, newname) == -1) {
+               if (g_rename (oldname, newname) == -1 && errno != ENOENT) {
                        g_warning (
-                               "%s: Failed to rename '%s' to '%s': %s", G_STRFUNC,
-                               oldname, newname, g_strerror (errno));
+                               "%s: Failed to rename '%s' to '%s': %s",
+                               G_STRFUNC,
+                               oldname, newname,
+                               g_strerror (errno));
                }
 
                g_free (oldname);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]