diff options
-rw-r--r-- | 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 bcf74bb0af..2faaed3468 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)); |