aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/imap/camel-imap-store.c
diff options
context:
space:
mode:
Diffstat (limited to 'camel/providers/imap/camel-imap-store.c')
-rw-r--r--camel/providers/imap/camel-imap-store.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c
index 4d983bebf0..99c77c6f27 100644
--- a/camel/providers/imap/camel-imap-store.c
+++ b/camel/providers/imap/camel-imap-store.c
@@ -1140,8 +1140,12 @@ get_folder_offline (CamelStore *store, const char *folder_name,
folder_name = "INBOX";
folder_dir = e_path_to_physical (imap_store->storage_path, folder_name);
- if (access (folder_dir, F_OK) != 0)
- return no_such_folder (folder_name, ex);
+ if (!folder_dir || access (folder_dir, F_OK) != 0) {
+ g_free (folder_dir);
+ camel_exception_setv (ex, CAMEL_EXCEPTION_STORE_NO_FOLDER,
+ _("No such folder %s"), folder_name);
+ return NULL;
+ }
new_folder = camel_imap_folder_new (store, folder_name, folder_dir, ex);
g_free (folder_dir);