aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-store.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-04-17 01:09:38 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-04-17 01:09:38 +0800
commit8cc3a0e4dc9d3664f7b4e54d03d1c5b1936eb2da (patch)
treece8454bcd1bee579b4fb0977872e85ed8f411358 /camel/camel-store.c
parent62e82291e808731ec8d97fffe4528c641d31d939 (diff)
downloadgsoc2013-evolution-8cc3a0e4dc9d3664f7b4e54d03d1c5b1936eb2da.tar
gsoc2013-evolution-8cc3a0e4dc9d3664f7b4e54d03d1c5b1936eb2da.tar.gz
gsoc2013-evolution-8cc3a0e4dc9d3664f7b4e54d03d1c5b1936eb2da.tar.bz2
gsoc2013-evolution-8cc3a0e4dc9d3664f7b4e54d03d1c5b1936eb2da.tar.lz
gsoc2013-evolution-8cc3a0e4dc9d3664f7b4e54d03d1c5b1936eb2da.tar.xz
gsoc2013-evolution-8cc3a0e4dc9d3664f7b4e54d03d1c5b1936eb2da.tar.zst
gsoc2013-evolution-8cc3a0e4dc9d3664f7b4e54d03d1c5b1936eb2da.zip
Remove the EXTRA_GNOME_CFLAGS include.
2001-04-16 Jeffrey Stedfast <fejj@ximian.com> * Makefile.am: Remove the EXTRA_GNOME_CFLAGS include. * camel-store.c (camel_mkdir_hier): Convenience function that it seems a number of camel-store implementations used gal for. * providers/nntp/camel-nntp-store.c (ensure_news_dir_exists): Lets not depend on gal for just e_mkdir_hier() - use camel_mkdir_hier() instead. * providers/nntp/camel-imap-store.c: Lets not depend on gal for just e_mkdir_hier() - use camel_mkdir_hier() instead. * camel-session.c (camel_session_get_storage_path): Don't depend on e_mkdir_heir() anymore, use the CamelStore version. * camel-folder-search.h: Removed gal dependency, why was this even there in the first place? * providers/imap/camel-imap-folder.c: Don't need gal/util/e-util.h here, so remove it. * string-utils.c (strstrcase): New function, well more like old function brought back to life so we don't have to depend on gal. * providers/imap/camel-imap-store.c (imap_store_setup_online): Use strstrcase rather than e_strstrcase so we don't depend on gal. (get_unread_online): Same here. * providers/smtp/camel-smtp-transport.c (smtp_helo): Use strstrcase. svn path=/trunk/; revision=9383
Diffstat (limited to 'camel/camel-store.c')
-rw-r--r--camel/camel-store.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/camel/camel-store.c b/camel/camel-store.c
index e01509e029..3314b710d8 100644
--- a/camel/camel-store.c
+++ b/camel/camel-store.c
@@ -777,3 +777,28 @@ camel_store_unsubscribe_folder (CamelStore *store,
CAMEL_STORE_UNLOCK(store, folder_lock);
}
+
+
+int
+camel_mkdir_hier (const char *path, mode_t mode)
+{
+ char *copy, *p;
+
+ p = copy = g_strdup (path);
+ do {
+ p = strchr (p + 1, '/');
+ if (p)
+ *p = '\0';
+ if (access (copy, F_OK) == -1) {
+ if (mkdir (copy, mode) == -1) {
+ g_free (copy);
+ return -1;
+ }
+ }
+ if (p)
+ *p = '/';
+ } while (p);
+
+ g_free (copy);
+ return 0;
+}