[evolution] MailFolderCache: Remove some nuisance runtime warnings.
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] MailFolderCache: Remove some nuisance runtime warnings.
- Date: Tue, 10 Dec 2013 20:03:40 +0000 (UTC)
commit 30920a80243aae0a5839c805e8993f77e9899854
Author: Matthew Barnes <mbarnes redhat com>
Date: Tue Dec 10 15:02:42 2013 -0500
MailFolderCache: Remove some nuisance runtime warnings.
When renaming a folder, don't warn if the GalView files for the folder
don't exist (errno == ENOENT). It may be the folder was never viewed.
libemail-engine/mail-folder-cache.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/libemail-engine/mail-folder-cache.c b/libemail-engine/mail-folder-cache.c
index bcf74bb..2faaed3 100644
--- a/libemail-engine/mail-folder-cache.c
+++ b/libemail-engine/mail-folder-cache.c
@@ -1155,7 +1155,7 @@ rename_folders (MailFolderCache *cache,
e_filename_make_safe (newuri);
oldfile = g_strdup_printf ("%s/custom_view-%s.xml", config_dir, olduri);
newfile = g_strdup_printf ("%s/custom_view-%s.xml", config_dir, newuri);
- if (g_rename (oldfile, newfile) == -1) {
+ if (g_rename (oldfile, newfile) == -1 && errno != ENOENT) {
g_warning (
"%s: Failed to rename '%s' to '%s': %s", G_STRFUNC,
oldfile, newfile, g_strerror (errno));
@@ -1164,7 +1164,7 @@ rename_folders (MailFolderCache *cache,
g_free (newfile);
oldfile = g_strdup_printf ("%s/current_view-%s.xml", config_dir, olduri);
newfile = g_strdup_printf ("%s/current_view-%s.xml", config_dir, newuri);
- if (g_rename (oldfile, newfile) == -1) {
+ if (g_rename (oldfile, newfile) == -1 && errno != ENOENT) {
g_warning (
"%s: Failed to rename '%s' to '%s': %s", G_STRFUNC,
oldfile, newfile, g_strerror (errno));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]