aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/local
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2002-09-26 13:56:12 +0800
committerMichael Zucci <zucchi@src.gnome.org>2002-09-26 13:56:12 +0800
commit3cb66ed22a86f8e193f4a28cb8cc3ddd31f427bd (patch)
tree4e71c3547df2715e0aacdc031c06d2cc06967e47 /camel/providers/local
parenta007d6d2084df436d5f1fa2b6804064c6e7c62e0 (diff)
downloadgsoc2013-evolution-3cb66ed22a86f8e193f4a28cb8cc3ddd31f427bd.tar
gsoc2013-evolution-3cb66ed22a86f8e193f4a28cb8cc3ddd31f427bd.tar.gz
gsoc2013-evolution-3cb66ed22a86f8e193f4a28cb8cc3ddd31f427bd.tar.bz2
gsoc2013-evolution-3cb66ed22a86f8e193f4a28cb8cc3ddd31f427bd.tar.lz
gsoc2013-evolution-3cb66ed22a86f8e193f4a28cb8cc3ddd31f427bd.tar.xz
gsoc2013-evolution-3cb66ed22a86f8e193f4a28cb8cc3ddd31f427bd.tar.zst
gsoc2013-evolution-3cb66ed22a86f8e193f4a28cb8cc3ddd31f427bd.zip
Treat spool as a local folder, so the ref checks work right.
2002-09-26 Not Zed <NotZed@Ximian.com> * tests/folder/test2.c (main): Treat spool as a local folder, so the ref checks work right. * providers/local/camel-spool-store.c (get_folder): Use creat() instead of open() to create file. svn path=/trunk/; revision=18231
Diffstat (limited to 'camel/providers/local')
-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);
}
}