[evolution-data-server] Bug 726204 - Ugly error message when creating Maildir folder fails
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Bug 726204 - Ugly error message when creating Maildir folder fails
- Date: Thu, 13 Mar 2014 12:51:29 +0000 (UTC)
commit 432a4a346a2c88c4cd6c5e20aeb10e81e1ae37c8
Author: Matthew Barnes <mbarnes redhat com>
Date: Thu Mar 13 08:51:20 2014 -0400
Bug 726204 - Ugly error message when creating Maildir folder fails
camel/providers/local/camel-maildir-store.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/camel/providers/local/camel-maildir-store.c b/camel/providers/local/camel-maildir-store.c
index 4dfe921..1b0632a 100644
--- a/camel/providers/local/camel-maildir-store.c
+++ b/camel/providers/local/camel-maildir-store.c
@@ -143,12 +143,18 @@ maildir_store_create_folder_sync (CamelStore *store,
g_free (name);
name = NULL;
- if (g_stat (fullname, &st) == 0 || errno != ENOENT) {
+ if (g_stat (fullname, &st) == 0) {
+ g_set_error (
+ error, G_IO_ERROR, G_IO_ERROR_EXISTS,
+ _("Folder %s already exists"), folder_name);
+ goto exit;
+
+ } else if (errno != ENOENT) {
g_set_error (
error, G_IO_ERROR,
g_io_error_from_errno (errno),
_("Cannot get folder: %s: %s"),
- name, g_strerror (errno));
+ folder_name, g_strerror (errno));
goto exit;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]