aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/local/camel-spool-store.c
diff options
context:
space:
mode:
Diffstat (limited to 'camel/providers/local/camel-spool-store.c')
-rw-r--r--camel/providers/local/camel-spool-store.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/camel/providers/local/camel-spool-store.c b/camel/providers/local/camel-spool-store.c
index b1e7c7e091..dc35f75a2a 100644
--- a/camel/providers/local/camel-spool-store.c
+++ b/camel/providers/local/camel-spool-store.c
@@ -163,13 +163,11 @@ get_folder(CamelStore * store, const char *folder_name, guint32 flags, CamelExce
camel_exception_setv(ex, CAMEL_EXCEPTION_STORE_NO_FOLDER,
_("Folder `%s' does not exist."), folder_name);
} else {
- fd = open(name, O_CREAT, 0600);
- if (fd == -1) {
+ if (creat(name, 0600) == -1) {
camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
_("Could not create folder `%s':\n%s"),
folder_name, strerror(errno));
} else {
- close(fd);
folder = camel_spool_folder_new(store, folder_name, flags, ex);
}
}