Re: [evolution-patches] Possible fix for removal of duplicated files in evolution/e-util



Hi guys,

According to Tor's suggestion, I updated the patches for merging some functions of evo/e-util/e-util.c into e-d-s/libedatasever/e-util.c. Please help me review.

To summary:
1..e_utf8_strftime() and e_filename_make_safe()
Delete the copies in evo directory, and all the callers are redirected to the one in e-d-s directory.

2.e_strftime()
Merge the change of the copy in evo into e-d-s, and delete the one in evo.

3.e_util_strstrcase() vs e_strstrcase().
Delete the copy in evo, and the callers use e_util_strstrcase instead.

4. e_util_mkdir_hier() vs e_mkdir_hier()
Merge the change of the e_mkdir_hier() in evo into e_util_mkdir_hier() in e-d-s, and delete e_mkdir_hier().
The following two copies is replaced as e_util_mkdir_hier().
   camel_mkdir() -- e-d-s/camel/camel-file-utils.c
   make_dir()      -- e-exchange/storage/exchange-migrate.c

5. At last, rename e-util.* in e-d-s as e-data-server-util.*.

Thanks,
-Simon
Index: evolution-exchange/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-exchange/ChangeLog,v
retrieving revision 1.432
diff -u -p -r1.432 ChangeLog
--- evolution-exchange/ChangeLog	21 Dec 2005 06:51:48 -0000	1.432
+++ evolution-exchange/ChangeLog	21 Dec 2005 12:47:38 -0000
@@ -1,3 +1,8 @@
+2005-12-21  Simon Zhengi  <simon zheng sun com>
+
+        * storage/exchange-migrate.c: Delete make_dir() and use 
+	the e_util_mkdir_hier() instead of it.
+
 2005-12-21  Sushma Rai  <rsushma novell com>
 
 	* addressbook/e-book-backend-exchange.c 
Index: evolution-exchange/camel/camel-exchange-folder.c
===================================================================
RCS file: /cvs/gnome/evolution-exchange/camel/camel-exchange-folder.c,v
retrieving revision 1.20
diff -u -p -r1.20 camel-exchange-folder.c
--- evolution-exchange/camel/camel-exchange-folder.c	15 Sep 2005 13:29:33 -0000	1.20
+++ evolution-exchange/camel/camel-exchange-folder.c	21 Dec 2005 12:47:38 -0000
@@ -27,6 +27,7 @@
 #include <string.h>
 #include <sys/stat.h>
 
+#include <libedataserver/e-data-server-util.h>
 #include <camel/camel-i18n.h>
 
 #include "camel-exchange-folder.h"
@@ -983,7 +984,7 @@ camel_exchange_folder_construct (CamelFo
 		short_name = name;
 	camel_folder_construct (folder, parent, name, short_name);
 
-	if (camel_mkdir (folder_dir, S_IRWXU) != 0) {
+	if (e_util_mkdir_hier (folder_dir, S_IRWXU) != 0) {
 		camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
 				      _("Could not create directory %s: %s"),
 				      folder_dir, g_strerror (errno));
Index: evolution-exchange/mail/mail-utils.c
===================================================================
RCS file: /cvs/gnome/evolution-exchange/mail/mail-utils.c,v
retrieving revision 1.5
diff -u -p -r1.5 mail-utils.c
--- evolution-exchange/mail/mail-utils.c	1 Aug 2005 11:46:22 -0000	1.5
+++ evolution-exchange/mail/mail-utils.c	21 Dec 2005 12:47:39 -0000
@@ -31,6 +31,7 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include <libedataserver/e-data-server-util.h>
 #include <e-util/e-html-utils.h>
 #include <e-util/e-util.h>
 #include <libical/ical.h>
@@ -201,7 +202,7 @@ mail_util_extract_transport_headers (E2k
 	if (!hend)
 		hend = hstart + strlen (hstart);
 
-	ctstart = e_strstrcase (hstart - 1, "\nContent-Type:");
+	ctstart = e_util_strstrcase (hstart - 1, "\nContent-Type:");
 	if (ctstart && ctstart < hend) {
 		ctend = strchr (ctstart, '\n');
 
Index: evolution-exchange/storage/exchange-migrate.c
===================================================================
RCS file: /cvs/gnome/evolution-exchange/storage/exchange-migrate.c,v
retrieving revision 1.6
diff -u -p -r1.6 exchange-migrate.c
--- evolution-exchange/storage/exchange-migrate.c	11 Oct 2005 09:33:05 -0000	1.6
+++ evolution-exchange/storage/exchange-migrate.c	21 Dec 2005 12:47:39 -0000
@@ -33,6 +33,7 @@
 #include <gtk/gtkmain.h>
 #include <gtk/gtklabel.h>
 #include <gtk/gtkprogressbar.h>
+#include <libedataserver/e-data-server-util.h>
 #include <e-util/e-folder-map.h>
 
 #include <exchange-types.h>
@@ -151,33 +152,6 @@ dialog_set_progress (double percent)
 }
 
 static gboolean
-make_dir (const char *path, mode_t mode)
-{
-	char *copy, *p;
-
-	g_assert(path && path[0] == '/');
-
-	p = copy = g_alloca (strlen (path) + 1);
-	strcpy(copy, 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 FALSE;
-			}
-		}
-		if (p)
-			*p = '/';
-	} while (p);
-
-	g_free (copy);
-	return TRUE;
-}
-
-static gboolean
 cp (const char *src, const char *dest, gboolean show_progress)
 {
 	unsigned char readbuf[65536];
@@ -268,7 +242,7 @@ cp_r (char *src, const char *dest)
 	struct stat st;
 	DIR *dir;
 
-	if (make_dir (dest, 0777) == -1)
+	if (e_util_mkdir_hier (dest, 0777) == -1)
 		return FALSE;
 
 	if (!(dir = opendir (src)))
@@ -400,7 +374,7 @@ migrate_contacts (gchar *src_path, const
 							NULL);
 			
 				/* Create destination dir, and copy the files */
-       				if (make_dir (contacts_dir, 0777) == -1) {
+       				if (e_util_mkdir_hier (contacts_dir, 0777) == -1) {
 					ret = FALSE;
 					g_free (dest_file);
 					g_free (contacts_dir);
@@ -497,7 +471,7 @@ exchange_migrate (const CORBA_short majo
 		/* This is not needed if done by cp_r() */
         	if (stat (base_dir, &st) == -1) {
 			if (errno != ENOENT || 
-			    make_dir (base_dir, 0777) == -1) {
+			    e_util_mkdir_hier (base_dir, 0777) == -1) {
                        		printf ("Failed to create directory `%s': %s",
 				base_dir, g_strerror (errno));
                         	return;
Index: evolution-data-server/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/ChangeLog,v
retrieving revision 1.350
diff -u -p -r1.350 ChangeLog
--- evolution-data-server/ChangeLog	13 Dec 2005 14:07:16 -0000	1.350
+++ evolution-data-server/ChangeLog	21 Dec 2005 10:31:25 -0000
@@ -1,3 +1,15 @@
+2005-12-21  Simon.zheng  <simon zheng sun com>
+
+	* libedataserver/e-util.c (e_util_mkdir_hier): Merge the change of
+	evolution/e-util/e-util.c (e_mkdir_hier) into this copy. 
+
+	(e_util_strstrcase): Merge the change of evolution/e-util/e-util.c 
+	into this copy. 
+	
+	Rename e-util.c as e-data-server-util.c.
+	
+	* libedataserver/e-util.h : Rename this file as e-data-server-util.h
+
 2005-12-13  Tor Lillqvist  <tml novell com>
 
 	* libedataserver/e-uid.c (e_uid_new): Use g_get_host_name() when
Index: evolution-data-server/addressbook/backends/file/e-book-backend-file.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/addressbook/backends/file/e-book-backend-file.c,v
retrieving revision 1.39
diff -u -p -r1.39 e-book-backend-file.c
--- evolution-data-server/addressbook/backends/file/e-book-backend-file.c	8 Dec 2005 04:29:33 -0000	1.39
+++ evolution-data-server/addressbook/backends/file/e-book-backend-file.c	21 Dec 2005 10:31:26 -0000
@@ -42,7 +42,7 @@
 
 #include "libedataserver/e-dbhash.h"
 #include "libedataserver/e-db3-utils.h"
-#include "libedataserver/e-util.h"
+#include "libedataserver/e-data-server-util.h"
 
 #include "libebook/e-contact.h"
 
Index: evolution-data-server/addressbook/backends/groupwise/e-book-backend-groupwise.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/addressbook/backends/groupwise/e-book-backend-groupwise.c,v
retrieving revision 1.70
diff -u -p -r1.70 e-book-backend-groupwise.c
--- evolution-data-server/addressbook/backends/groupwise/e-book-backend-groupwise.c	8 Dec 2005 04:34:48 -0000	1.70
+++ evolution-data-server/addressbook/backends/groupwise/e-book-backend-groupwise.c	21 Dec 2005 10:31:26 -0000
@@ -35,7 +35,7 @@
 #include <glib/gi18n-lib.h>
 
 #include "libedataserver/e-sexp.h"
-#include "libedataserver/e-util.h"
+#include "libedataserver/e-data-server-util.h"
 #include "libedataserver/e-url.h" 
 #include "libebook/e-contact.h"
 #include "libedata-book/e-book-backend-sexp.h"
Index: evolution-data-server/addressbook/backends/vcf/e-book-backend-vcf.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/addressbook/backends/vcf/e-book-backend-vcf.c,v
retrieving revision 1.21
diff -u -p -r1.21 e-book-backend-vcf.c
--- evolution-data-server/addressbook/backends/vcf/e-book-backend-vcf.c	8 Dec 2005 04:40:34 -0000	1.21
+++ evolution-data-server/addressbook/backends/vcf/e-book-backend-vcf.c	21 Dec 2005 10:31:26 -0000
@@ -40,7 +40,7 @@
 #include <glib/gstdio.h>
 #include <glib/gi18n-lib.h>
 
-#include "libedataserver/e-util.h"
+#include "libedataserver/e-data-server-util.h"
 
 #include "libebook/e-contact.h"
  
Index: evolution-data-server/addressbook/libebook/e-address-western.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/addressbook/libebook/e-address-western.c,v
retrieving revision 1.3
diff -u -p -r1.3 e-address-western.c
--- evolution-data-server/addressbook/libebook/e-address-western.c	4 May 2005 08:46:12 -0000	1.3
+++ evolution-data-server/addressbook/libebook/e-address-western.c	21 Dec 2005 10:31:26 -0000
@@ -14,7 +14,7 @@
 #include <glib.h>
 
 #include "e-address-western.h"
-#include "libedataserver/e-util.h"
+#include "libedataserver/e-data-server-util.h"
 
 /* These are the keywords that will distinguish the start of an extended
    address. */
Index: evolution-data-server/addressbook/libebook/e-contact.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/addressbook/libebook/e-contact.c,v
retrieving revision 1.54
diff -u -p -r1.54 e-contact.c
--- evolution-data-server/addressbook/libebook/e-contact.c	25 Nov 2005 03:28:51 -0000	1.54
+++ evolution-data-server/addressbook/libebook/e-contact.c	21 Dec 2005 10:31:26 -0000
@@ -33,7 +33,7 @@
 #include "e-name-western.h"
 
 #ifdef G_OS_WIN32
-#include <libedataserver/e-util.h>
+#include <libedataserver/e-data-server-util.h>
 #undef EVOLUTION_LOCALEDIR
 #define EVOLUTION_LOCALEDIR e_util_get_localedir ()
 #endif
Index: evolution-data-server/addressbook/libedata-book/e-book-backend-sexp.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/addressbook/libedata-book/e-book-backend-sexp.c,v
retrieving revision 1.14
diff -u -p -r1.14 e-book-backend-sexp.c
--- evolution-data-server/addressbook/libedata-book/e-book-backend-sexp.c	9 Dec 2005 10:56:46 -0000	1.14
+++ evolution-data-server/addressbook/libedata-book/e-book-backend-sexp.c	21 Dec 2005 10:31:26 -0000
@@ -20,7 +20,7 @@
 
 #include <string.h>
 #include <libedataserver/e-sexp.h>
-#include <libedataserver/e-util.h>
+#include <libedataserver/e-data-server-util.h>
 #include "e-book-backend-sexp.h"
 
 static GObjectClass *parent_class;
Index: evolution-data-server/addressbook/libedata-book/e-book-backend-summary.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/addressbook/libedata-book/e-book-backend-summary.c,v
retrieving revision 1.13
diff -u -p -r1.13 e-book-backend-summary.c
--- evolution-data-server/addressbook/libedata-book/e-book-backend-summary.c	9 Dec 2005 10:56:46 -0000	1.13
+++ evolution-data-server/addressbook/libedata-book/e-book-backend-summary.c	21 Dec 2005 10:31:26 -0000
@@ -34,7 +34,7 @@
 #include <glib/gstdio.h>
 
 #include "libedataserver/e-sexp.h"
-#include "libedataserver/e-util.h"
+#include "libedataserver/e-data-server-util.h"
 
 #include "libebook/e-contact.h"
 
Index: evolution-data-server/calendar/backends/file/e-cal-backend-file.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/backends/file/e-cal-backend-file.c,v
retrieving revision 1.68
diff -u -p -r1.68 e-cal-backend-file.c
--- evolution-data-server/calendar/backends/file/e-cal-backend-file.c	8 Dec 2005 06:17:19 -0000	1.68
+++ evolution-data-server/calendar/backends/file/e-cal-backend-file.c	21 Dec 2005 10:31:26 -0000
@@ -33,7 +33,7 @@
 #include <glib/gstdio.h>
 #include <glib/gi18n-lib.h>
 #include <libgnomevfs/gnome-vfs.h>
-#include <libedataserver/e-util.h>
+#include <libedataserver/e-data-server-util.h>
 #include <libedataserver/e-xml-hash-utils.h>
 #include <libecal/e-cal-recur.h>
 #include <libecal/e-cal-time-util.h>
Index: evolution-data-server/calendar/backends/weather/e-weather-source-ccf.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/backends/weather/e-weather-source-ccf.c,v
retrieving revision 1.4
diff -u -p -r1.4 e-weather-source-ccf.c
--- evolution-data-server/calendar/backends/weather/e-weather-source-ccf.c	9 Dec 2005 11:27:19 -0000	1.4
+++ evolution-data-server/calendar/backends/weather/e-weather-source-ccf.c	21 Dec 2005 10:31:26 -0000
@@ -39,7 +39,7 @@
 
 #ifdef G_OS_WIN32
 
-#include <libedataserver/e-util.h>
+#include <libedataserver/e-data-server-util.h>
 
 /* The localtime_r() in <pthread.h> doesn't guard against localtime()
  * returning NULL
Index: evolution-data-server/calendar/libecal/e-cal-util.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/libecal/e-cal-util.c,v
retrieving revision 1.13
diff -u -p -r1.13 e-cal-util.c
--- evolution-data-server/calendar/libecal/e-cal-util.c	9 Dec 2005 11:33:55 -0000	1.13
+++ evolution-data-server/calendar/libecal/e-cal-util.c	21 Dec 2005 10:31:27 -0000
@@ -25,7 +25,7 @@
 #include <glib.h>
 #include <glib/gstdio.h>
 #include <glib/gi18n-lib.h>
-#include "libedataserver/e-util.h"
+#include "libedataserver/e-data-server-util.h"
 #include "e-cal-util.h"
 
 
Index: evolution-data-server/calendar/libedata-cal/e-cal-backend-sexp.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/libedata-cal/e-cal-backend-sexp.c,v
retrieving revision 1.21
diff -u -p -r1.21 e-cal-backend-sexp.c
--- evolution-data-server/calendar/libedata-cal/e-cal-backend-sexp.c	6 May 2005 11:22:28 -0000	1.21
+++ evolution-data-server/calendar/libedata-cal/e-cal-backend-sexp.c	21 Dec 2005 10:31:27 -0000
@@ -24,7 +24,7 @@
 
 #include <string.h>
 #include <glib/gi18n-lib.h>
-#include <libedataserver/e-util.h>
+#include <libedataserver/e-data-server-util.h>
 #include <libecal/e-cal-time-util.h>
 
 #include "e-cal-backend-sexp.h"
Index: evolution-data-server/camel/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/ChangeLog,v
retrieving revision 1.2510
diff -u -p -r1.2510 ChangeLog
--- evolution-data-server/camel/ChangeLog	13 Dec 2005 13:54:59 -0000	1.2510
+++ evolution-data-server/camel/ChangeLog	21 Dec 2005 10:31:27 -0000
@@ -1,3 +1,8 @@
+2005-12-21  Simon Zheng  <Simon Zheng sun com>
+
+	* camel-file-utils.c : Delete camel_mkdir(), and all the callers 
+	use e_util_mkdir_hier() instead.
+
 2005-12-13  Tor Lillqvist  <tml novell com>
 
 	* camel-filter-driver.c: Use gstdio wrappers. Use
Index: evolution-data-server/camel/camel-data-cache.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/camel-data-cache.c,v
retrieving revision 1.19
diff -u -p -r1.19 camel-data-cache.c
--- evolution-data-server/camel/camel-data-cache.c	1 Dec 2005 11:21:12 -0000	1.19
+++ evolution-data-server/camel/camel-data-cache.c	21 Dec 2005 10:31:27 -0000
@@ -35,6 +35,7 @@
 
 #include <glib/gstdio.h>
 
+#include <libedataserver/e-data-server-util.h>
 #include "camel-i18n.h"
 #include "camel-data-cache.h"
 #include "camel-exception.h"
@@ -130,7 +131,7 @@ camel_data_cache_new(const char *path, g
 {
 	CamelDataCache *cdc;
 
-	if (camel_mkdir (path, 0700) == -1) {
+	if (e_util_mkdir_hier (path, 0700) == -1) {
 		camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
 				     _("Unable to create cache path"));
 		return NULL;
@@ -246,7 +247,7 @@ data_cache_path(CamelDataCache *cdc, int
 	if (access (dir, F_OK) == -1) {
 #endif
 		if (create)
-			camel_mkdir (dir, 0700);
+			e_util_mkdir_hier (dir, 0700);
 	} else if (cdc->priv->expire_inc == hash
 		   && (cdc->expire_age != -1 || cdc->expire_access != -1)) {
 		time_t now;
Index: evolution-data-server/camel/camel-debug.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/camel-debug.c,v
retrieving revision 1.5
diff -u -p -r1.5 camel-debug.c
--- evolution-data-server/camel/camel-debug.c	15 Sep 2005 12:24:59 -0000	1.5
+++ evolution-data-server/camel/camel-debug.c	21 Dec 2005 10:31:27 -0000
@@ -25,7 +25,7 @@
 
 #include <pthread.h>
 
-#include "libedataserver/e-util.h"
+#include "libedataserver/e-data-server-util.h"
 #include "camel-debug.h"
 
 int camel_verbose_debug;
Index: evolution-data-server/camel/camel-file-utils.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/camel-file-utils.c,v
retrieving revision 1.15
diff -u -p -r1.15 camel-file-utils.c
--- evolution-data-server/camel/camel-file-utils.c	8 Dec 2005 06:41:55 -0000	1.15
+++ evolution-data-server/camel/camel-file-utils.c	21 Dec 2005 10:31:27 -0000
@@ -41,7 +41,7 @@
 #define EWOULDBLOCK EAGAIN
 #endif
 
-#include "libedataserver/e-util.h"
+#include "libedataserver/e-data-server-util.h"
 
 #include "camel-file-utils.h"
 #include "camel-operation.h"
@@ -316,46 +316,6 @@ camel_file_util_decode_string (FILE *in,
 	return 0;
 }
 
-
-/**
- * camel_mkdir:
- * @path: directory path to create
- * @mode: permissions
- *
- * Creates the directory path described in @path, creating any parent
- * directories as necessary.
- *
- * Returns 0 on success or -1 on fail. In the case of failure, errno
- * will be set appropriately.
- **/
-int
-camel_mkdir (const char *path, mode_t mode)
-{
-#if GLIB_CHECK_VERSION(2,8,0)
-	g_assert(path && g_path_is_absolute (path));
-	return g_mkdir_with_parents (path, mode);
-#else
-	char *copy, *p;
-	
-	g_assert(path && path[0] == '/');
-	
-	p = copy = g_alloca (strlen (path) + 1);
-	strcpy(copy, path);
-	do {
-		p = strchr(p + 1, '/');
-		if (p)
-			*p = '\0';
-		if (access(copy, F_OK) == -1) {
-			if (mkdir(copy, mode) == -1)
-				return -1;
-		}
-		if (p)
-			*p = '/';
-	} while (p);
-	
-	return 0;
-#endif
-}
 
 /**
  * camel_file_util_safe_filename:
Index: evolution-data-server/camel/camel-file-utils.h
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/camel-file-utils.h,v
retrieving revision 1.10
diff -u -p -r1.10 camel-file-utils.h
--- evolution-data-server/camel/camel-file-utils.h	30 Nov 2005 09:54:54 -0000	1.10
+++ evolution-data-server/camel/camel-file-utils.h	21 Dec 2005 10:31:27 -0000
@@ -55,7 +55,6 @@ int camel_file_util_decode_size_t (FILE 
 int camel_file_util_encode_string (FILE *out, const char *);
 int camel_file_util_decode_string (FILE *in, char **);
 
-int camel_mkdir (const char *path, mode_t mode);
 char *camel_file_util_safe_filename (const char *name);
 
 /* Code that intends to be portable to Win32 should use camel_read()
Index: evolution-data-server/camel/camel-object.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/camel-object.c,v
retrieving revision 1.57
diff -u -p -r1.57 camel-object.c
--- evolution-data-server/camel/camel-object.c	13 Dec 2005 04:58:42 -0000	1.57
+++ evolution-data-server/camel/camel-object.c	21 Dec 2005 10:31:28 -0000
@@ -31,6 +31,7 @@
 
 #include "libedataserver/e-memory.h"
 #include "libedataserver/e-msgport.h"
+#include "libedataserver/e-data-server-util.h"
 
 #include "camel-file-utils.h"
 #include "camel-object.h"
@@ -1844,7 +1845,7 @@ int camel_object_state_write(void *vo)
 
 	savename = camel_file_util_savename(file);
 	dirname = g_path_get_dirname(savename);
-	camel_mkdir(dirname, 0777);
+	e_util_mkdir_hier(dirname, 0777);
 	g_free(dirname);
 	fp = g_fopen(savename, "wb");
 	if (fp != NULL) {
Index: evolution-data-server/camel/camel-session.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/camel-session.c,v
retrieving revision 1.114
diff -u -p -r1.114 camel-session.c
--- evolution-data-server/camel/camel-session.c	14 Dec 2005 13:15:22 -0000	1.114
+++ evolution-data-server/camel/camel-session.c	21 Dec 2005 10:31:28 -0000
@@ -36,6 +36,7 @@
 
 #include <glib/gstdio.h>
 
+#include "libedataserver/e-data-server-util.h"
 #include "camel-exception.h"
 #include "camel-file-utils.h"
 #include "camel-i18n.h"
@@ -285,7 +286,7 @@ get_storage_path (CamelSession *session,
 #endif
 		return path;
 
-	if (camel_mkdir (path, S_IRWXU) == -1) {
+	if (e_util_mkdir_hier (path, S_IRWXU) == -1) {
 		camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
 				      _("Could not create directory %s:\n%s"),
 				      path, g_strerror (errno));
Index: evolution-data-server/camel/camel-uid-cache.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/camel-uid-cache.c,v
retrieving revision 1.16
diff -u -p -r1.16 camel-uid-cache.c
--- evolution-data-server/camel/camel-uid-cache.c	30 Nov 2005 09:54:54 -0000	1.16
+++ evolution-data-server/camel/camel-uid-cache.c	21 Dec 2005 10:31:28 -0000
@@ -34,6 +34,7 @@
 
 #include <glib/gstdio.h>
 
+#include "libedataserver/e-data-server-util.h"
 #include "camel-file-utils.h"
 #include "camel-private.h"
 #include "camel-uid-cache.h"
@@ -63,7 +64,7 @@ camel_uid_cache_new (const char *filenam
 	int fd, i;
 	
 	dirname = g_path_get_dirname (filename);
-	if (camel_mkdir (dirname, 0777) == -1) {
+	if (e_util_mkdir_hier (dirname, 0777) == -1) {
 		g_free (dirname);
 		return NULL;
 	}
Index: evolution-data-server/camel/camel-win32.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/camel-win32.c,v
retrieving revision 1.4
diff -u -p -r1.4 camel-win32.c
--- evolution-data-server/camel/camel-win32.c	1 Dec 2005 10:32:30 -0000	1.4
+++ evolution-data-server/camel/camel-win32.c	21 Dec 2005 10:31:28 -0000
@@ -31,7 +31,7 @@
 #include <glib.h>
 #include <glib/gstdio.h>
 
-#include <libedataserver/e-util.h>
+#include <libedataserver/e-data-server-util.h>
 
 #include "camel.h"
 
Index: evolution-data-server/camel/providers/imap/camel-imap-folder.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/providers/imap/camel-imap-folder.c,v
retrieving revision 1.357
diff -u -p -r1.357 camel-imap-folder.c
--- evolution-data-server/camel/providers/imap/camel-imap-folder.c	8 Dec 2005 11:04:40 -0000	1.357
+++ evolution-data-server/camel/providers/imap/camel-imap-folder.c	21 Dec 2005 10:31:28 -0000
@@ -36,6 +36,7 @@
 
 /*#include "libedataserver/e-path.h"*/
 #include "libedataserver/e-time-utils.h"
+#include "libedataserver/e-data-server-util.h"
 
 #include "camel-imap-folder.h"
 #include "camel-imap-command.h"
@@ -227,7 +228,7 @@ camel_imap_folder_new (CamelStore *paren
 	const char *short_name;
 	char *summary_file, *state_file;
 
-	if (camel_mkdir (folder_dir, S_IRWXU) != 0) {
+	if (e_util_mkdir_hier (folder_dir, S_IRWXU) != 0) {
 		camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
 				      _("Could not create directory %s: %s"),
 				      folder_dir, g_strerror (errno));
Index: evolution-data-server/camel/providers/imap4/camel-imap4-folder.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/providers/imap4/camel-imap4-folder.c,v
retrieving revision 1.46
diff -u -p -r1.46 camel-imap4-folder.c
--- evolution-data-server/camel/providers/imap4/camel-imap4-folder.c	31 Aug 2005 04:26:05 -0000	1.46
+++ evolution-data-server/camel/providers/imap4/camel-imap4-folder.c	21 Dec 2005 10:31:28 -0000
@@ -35,6 +35,7 @@
 #include <errno.h>
 #include <time.h>
 
+#include <libedataserver/e-data-server-util.h>
 #include <camel/camel-utf8.h>
 #include <camel/camel-private.h>
 #include <camel/camel-file-utils.h>
@@ -345,7 +346,7 @@ camel_imap4_folder_new (CamelStore *stor
 	
 	folder->summary = camel_imap4_summary_new (folder);
 	imap4_folder->cachedir = imap4_store_build_filename (store, folder->full_name);
-	camel_mkdir (imap4_folder->cachedir, 0777);
+	e_util_mkdir_hier (imap4_folder->cachedir, 0777);
 	
 	imap4_folder->cache = camel_data_cache_new (imap4_folder->cachedir, 0, NULL);
 	
Index: evolution-data-server/camel/providers/imapp/camel-imapp-folder.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/providers/imapp/camel-imapp-folder.c,v
retrieving revision 1.6
diff -u -p -r1.6 camel-imapp-folder.c
--- evolution-data-server/camel/providers/imapp/camel-imapp-folder.c	31 Aug 2005 04:26:05 -0000	1.6
+++ evolution-data-server/camel/providers/imapp/camel-imapp-folder.c	21 Dec 2005 10:31:30 -0000
@@ -42,6 +42,7 @@
 #include "camel-imapp-exception.h"
 
 #include <libedataserver/md5-utils.h>
+#include <libedataserver/e-data-server-util.h>
 
 #include <stdlib.h>
 #include <string.h>
@@ -134,7 +135,7 @@ camel_imapp_folder_new(CamelStore *store
 		char *base = g_build_filename(root, path, NULL);
 		char *file = g_build_filename(base, ".ev-summary", NULL);
 
-		camel_mkdir(base, 0777);
+		e_util_mkdir_hier(base, 0777);
 		g_free(base);
 
 		camel_folder_summary_set_filename(folder->summary, file);
Index: evolution-data-server/camel/providers/local/camel-local-store.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/providers/local/camel-local-store.c,v
retrieving revision 1.40
diff -u -p -r1.40 camel-local-store.c
--- evolution-data-server/camel/providers/local/camel-local-store.c	8 Dec 2005 11:28:47 -0000	1.40
+++ evolution-data-server/camel/providers/local/camel-local-store.c	21 Dec 2005 10:31:30 -0000
@@ -32,6 +32,7 @@
 #include <glib.h>
 #include <glib/gstdio.h>
 
+#include <libedataserver/e-data-server-util.h>
 #include "camel/camel-exception.h"
 #include "camel/camel-file-utils.h"
 #include "camel/camel-i18n.h"
@@ -174,7 +175,7 @@ get_folder(CamelStore * store, const cha
 	}
 	
 	/* need to create the dir heirarchy */
-	if (camel_mkdir (path, 0777) == -1 && errno != EEXIST) {
+	if (e_util_mkdir_hier (path, 0777) == -1 && errno != EEXIST) {
 		camel_exception_setv (ex, CAMEL_EXCEPTION_STORE_NO_FOLDER,
 				      _("Cannot get folder: %s: %s"),
 				      path, g_strerror (errno));
Index: evolution-data-server/camel/providers/local/camel-mbox-store.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/providers/local/camel-mbox-store.c,v
retrieving revision 1.43
diff -u -p -r1.43 camel-mbox-store.c
--- evolution-data-server/camel/providers/local/camel-mbox-store.c	8 Dec 2005 11:28:47 -0000	1.43
+++ evolution-data-server/camel/providers/local/camel-mbox-store.c	21 Dec 2005 10:31:30 -0000
@@ -32,6 +32,7 @@
 #include <glib.h>
 #include <glib/gstdio.h>
 
+#include <libedataserver/e-data-server-util.h>
 #include "camel/camel-exception.h"
 #include "camel/camel-file-utils.h"
 #include "camel/camel-i18n.h"
@@ -168,7 +169,7 @@ get_folder(CamelStore *store, const char
 		g_free (basename);
 		
 		dirname = g_path_get_dirname(name);
-		if (camel_mkdir(dirname, 0777) == -1 && errno != EEXIST) {
+		if (e_util_mkdir_hier(dirname, 0777) == -1 && errno != EEXIST) {
 			camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
 					     _("Cannot create folder `%s': %s"),
 					     folder_name, g_strerror (errno));
@@ -359,7 +360,7 @@ create_folder(CamelStore *store, const c
 	path = camel_local_store_get_full_path(store, name);
 	
 	dir = g_path_get_dirname(path);
-	if (camel_mkdir(dir, 0777) == -1 && errno != EEXIST) {
+	if (e_util_mkdir_hier(dir, 0777) == -1 && errno != EEXIST) {
 		camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM, _("Cannot create directory `%s': %s."),
 				     dir, g_strerror(errno));
 		
@@ -477,7 +478,7 @@ rename_folder(CamelStore *store, const c
 	newibex = camel_local_store_get_meta_path(store, new, ".ibex");
 	
 	newdir = g_path_get_dirname(newibex);
-	if (camel_mkdir(newdir, 0777) == -1) {
+	if (e_util_mkdir_hier(newdir, 0777) == -1) {
 		if (errno != EEXIST) {
 			camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
 					     _("Could not rename `%s': `%s': %s"),
Index: evolution-data-server/camel/providers/local/camel-spool-store.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/providers/local/camel-spool-store.c,v
retrieving revision 1.26
diff -u -p -r1.26 camel-spool-store.c
--- evolution-data-server/camel/providers/local/camel-spool-store.c	31 Aug 2005 04:26:06 -0000	1.26
+++ evolution-data-server/camel/providers/local/camel-spool-store.c	21 Dec 2005 10:31:30 -0000
@@ -36,6 +36,7 @@
 #include <stdio.h>
 #include <dirent.h>
 
+#include <libedataserver/e-data-server-util.h>
 #include "camel-spool-store.h"
 #include "camel-spool-folder.h"
 #include "camel-exception.h"
@@ -492,7 +493,7 @@ spool_get_meta_path(CamelLocalStore *ls,
 	if (root == NULL)
 		return NULL;
 
-	camel_mkdir(root, 0777);
+	e_util_mkdir_hier(root, 0777);
 	key = camel_file_util_safe_filename(full_name);
 	path = g_strdup_printf("%s/%s%s", root, key, ext);
 	g_free(key);
Index: evolution-data-server/camel/providers/nntp/camel-nntp-folder.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/providers/nntp/camel-nntp-folder.c,v
retrieving revision 1.53
diff -u -p -r1.53 camel-nntp-folder.c
--- evolution-data-server/camel/providers/nntp/camel-nntp-folder.c	30 Nov 2005 16:04:02 -0000	1.53
+++ evolution-data-server/camel/providers/nntp/camel-nntp-folder.c	21 Dec 2005 10:31:30 -0000
@@ -31,6 +31,7 @@
 #include <unistd.h>
 #include <errno.h>
 
+#include <libedataserver/e-data-server-util.h>
 #include "camel/camel-file-utils.h"
 #include "camel/camel-stream-mem.h"
 #include "camel/camel-data-wrapper.h"
@@ -491,7 +492,7 @@ camel_nntp_folder_new (CamelStore *paren
 		return NULL;
 	
 	/* If this doesn't work, stuff wont save, but let it continue anyway */
-	camel_mkdir (root, 0777);
+	e_util_mkdir_hier (root, 0777);
 	
 	folder = (CamelFolder *) camel_object_new (CAMEL_NNTP_FOLDER_TYPE);
 	nntp_folder = (CamelNNTPFolder *)folder;
Index: evolution-data-server/docs/reference/camel/camel-sections.txt
===================================================================
RCS file: /cvs/gnome/evolution-data-server/docs/reference/camel/camel-sections.txt,v
retrieving revision 1.11
diff -u -p -r1.11 camel-sections.txt
--- evolution-data-server/docs/reference/camel/camel-sections.txt	13 May 2005 20:34:32 -0000	1.11
+++ evolution-data-server/docs/reference/camel/camel-sections.txt	21 Dec 2005 10:31:30 -0000
@@ -2913,7 +2913,6 @@ camel_file_util_encode_size_t
 camel_file_util_decode_size_t
 camel_file_util_encode_string
 camel_file_util_decode_string
-camel_mkdir
 camel_file_util_safe_filename
 camel_read
 camel_write
Index: evolution-data-server/docs/reference/camel/tmpl/camel-file-utils.sgml
===================================================================
RCS file: /cvs/gnome/evolution-data-server/docs/reference/camel/tmpl/camel-file-utils.sgml,v
retrieving revision 1.1
diff -u -p -r1.1 camel-file-utils.sgml
--- evolution-data-server/docs/reference/camel/tmpl/camel-file-utils.sgml	18 May 2005 14:00:52 -0000	1.1
+++ evolution-data-server/docs/reference/camel/tmpl/camel-file-utils.sgml	21 Dec 2005 10:31:30 -0000
@@ -134,16 +134,6 @@ camel-file-utils
 @Returns: 
 
 
-<!-- ##### FUNCTION camel_mkdir ##### -->
-<para>
-
-</para>
-
- path: 
- mode: 
- Returns: 
-
-
 <!-- ##### FUNCTION camel_file_util_safe_filename ##### -->
 <para>
 
Index: evolution-data-server/libedataserver/Makefile.am
===================================================================
RCS file: /cvs/gnome/evolution-data-server/libedataserver/Makefile.am,v
retrieving revision 1.27
diff -u -p -r1.27 Makefile.am
--- evolution-data-server/libedataserver/Makefile.am	8 Dec 2005 07:43:36 -0000	1.27
+++ evolution-data-server/libedataserver/Makefile.am	21 Dec 2005 10:31:31 -0000
@@ -39,7 +39,7 @@ libedataserver_1_2_la_SOURCES =		\
 	e-time-utils.c			\
 	e-uid.c				\
 	e-url.c				\
-	e-util.c			\
+	e-data-server-util.c			\
 	e-trie.c			\
 	e-xml-utils.c			\
 	e-xml-hash-utils.c		\
@@ -80,7 +80,7 @@ libedataserverinclude_HEADERS =		\
 	e-trie.h			\
 	e-uid.h				\
 	e-url.h				\
-	e-util.h			\
+	e-data-server-util.h			\
 	e-xml-utils.h			\
 	e-xml-hash-utils.h		\
 	md5-utils.h
Index: evolution-data-server/libedataserver/e-file-cache.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/libedataserver/e-file-cache.c,v
retrieving revision 1.15
diff -u -p -r1.15 e-file-cache.c
--- evolution-data-server/libedataserver/e-file-cache.c	8 Dec 2005 07:50:28 -0000	1.15
+++ evolution-data-server/libedataserver/e-file-cache.c	21 Dec 2005 10:31:31 -0000
@@ -27,7 +27,7 @@
 #include <glib/gstdio.h>
 
 #include "e-file-cache.h"
-#include "e-util.h"
+#include "e-data-server-util.h"
 #include "e-xml-hash-utils.h"
 
 struct _EFileCachePrivate {
Index: evolution-data-server/libedataserver/e-msgport.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/libedataserver/e-msgport.c,v
retrieving revision 1.5
diff -u -p -r1.5 e-msgport.c
--- evolution-data-server/libedataserver/e-msgport.c	9 Dec 2005 10:14:14 -0000	1.5
+++ evolution-data-server/libedataserver/e-msgport.c	21 Dec 2005 10:31:31 -0000
@@ -44,7 +44,7 @@
 #endif
 
 #include "e-msgport.h"
-#include "e-util.h"
+#include "e-data-server-util.h"
 
 #define m(x)			/* msgport debug */
 #define t(x)			/* thread debug */
Index: evolution-data-server/libedataserver/e-time-utils.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/libedataserver/e-time-utils.c,v
retrieving revision 1.5
diff -u -p -r1.5 e-time-utils.c
--- evolution-data-server/libedataserver/e-time-utils.c	25 Nov 2005 01:48:30 -0000	1.5
+++ evolution-data-server/libedataserver/e-time-utils.c	21 Dec 2005 10:31:31 -0000
@@ -27,7 +27,7 @@
 #include <glib.h>
 #include <glib/gi18n-lib.h>
 #include "e-time-utils.h"
-#include "e-util.h"
+#include "e-data-server-util.h"
 
 #ifdef G_OS_WIN32
 /* The localtime_r() definition in pthreads-win32's pthread.h doesn't guard
Index: evolution-data-server/libedataserver/e-util.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/libedataserver/e-util.c,v
retrieving revision 1.14
diff -u -p -r1.14 e-util.c
--- evolution-data-server/libedataserver/e-util.c	9 Dec 2005 10:31:38 -0000	1.14
+++ evolution-data-server/libedataserver/e-util.c	21 Dec 2005 10:31:31 -0000
@@ -28,7 +28,7 @@
 
 #include <glib.h>
 
-#include "e-util.h"
+#include "e-data-server-util.h"
 
 /**
  * e_util_mkdir_hier:
@@ -50,7 +50,7 @@ e_util_mkdir_hier (const char *path, mod
 #else
         char *copy, *p;
                                                                                 
-        if (path[0] == '/') {
+        if (g_path_is_absolute (path)) {
                 p = copy = g_strdup (path);
         } else {
                 gchar *current_dir = g_get_current_dir();
@@ -58,18 +58,29 @@ e_util_mkdir_hier (const char *path, mod
 		g_free (current_dir);
         }
                                                                                 
+	p = (char *)g_path_skip_root (p);                                                                       
         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 = '/';
+                char *p1 = strchr (p, '/');
+#ifdef G_OS_WIN32
+		{
+			char *p2 = strchr (p, '\\');
+			if (p1 == NULL ||
+			    (p2 != NULL && p2 < p1))
+				p1 = p2;
+		}
+#endif
+		p = p1;
+		if (p)
+			*p = '\0';
+		if (!g_file_test (copy, G_FILE_TEST_IS_DIR)) {
+			if (g_mkdir (copy, mode) == -1) {
+				g_free (copy);
+				return -1;
+			}
+		}
+		if (p) {
+			*p++ = '/';
+		}
         } while (p);
                                                                                 
         g_free (copy);
@@ -337,7 +348,7 @@ size_t e_strftime(char *s, size_t max, c
 		ff = c;
 	}
 
-	ff = fmt;
+	ff = ffmt;
 	while ((c = strstr(ff, "%k")) != NULL) {
 		c[1] = 'H';
 		ff = c;
Index: evolution-data-server/servers/exchange/lib/e2k-autoconfig.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/servers/exchange/lib/e2k-autoconfig.c,v
retrieving revision 1.10
diff -u -p -r1.10 e2k-autoconfig.c
--- evolution-data-server/servers/exchange/lib/e2k-autoconfig.c	19 Dec 2005 13:27:49 -0000	1.10
+++ evolution-data-server/servers/exchange/lib/e2k-autoconfig.c	21 Dec 2005 10:31:31 -0000
@@ -63,7 +63,7 @@
 #include "e2k-xml-utils.h"
 #include "xntlm.h"
 
-#include <libedataserver/e-util.h>
+#include <libedataserver/e-data-server-util.h>
 #include <libedataserverui/e-passwords.h>
 #include <gconf/gconf-client.h>
 #include <libxml/tree.h>
Index: evolution-data-server/servers/exchange/storage/e-folder-exchange.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/servers/exchange/storage/e-folder-exchange.c,v
retrieving revision 1.8
diff -u -p -r1.8 e-folder-exchange.c
--- evolution-data-server/servers/exchange/storage/e-folder-exchange.c	13 Dec 2005 03:54:29 -0000	1.8
+++ evolution-data-server/servers/exchange/storage/e-folder-exchange.c	21 Dec 2005 10:31:32 -0000
@@ -36,7 +36,7 @@
 #include <glib/gstdio.h>
 
 #include "libedataserver/e-source-list.h"
-#include "libedataserver/e-util.h"
+#include "libedataserver/e-data-server-util.h"
 #include "libedataserver/e-xml-utils.h"
 
 #include "e-folder-exchange.h"
Index: evolution-data-server/servers/exchange/storage/e-folder.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/servers/exchange/storage/e-folder.c,v
retrieving revision 1.4
diff -u -p -r1.4 e-folder.c
--- evolution-data-server/servers/exchange/storage/e-folder.c	31 Aug 2005 04:26:09 -0000	1.4
+++ evolution-data-server/servers/exchange/storage/e-folder.c	21 Dec 2005 10:31:32 -0000
@@ -29,7 +29,7 @@
 
 #include <string.h>
 #include <glib.h>
-#include <libedataserver/e-util.h>
+#include <libedataserver/e-data-server-util.h>
 
 #define PARENT_TYPE G_TYPE_OBJECT
 static GObjectClass *parent_class = NULL;
Index: evolution-data-server/servers/exchange/storage/e-storage.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/servers/exchange/storage/e-storage.c,v
retrieving revision 1.4
diff -u -p -r1.4 e-storage.c
--- evolution-data-server/servers/exchange/storage/e-storage.c	31 Aug 2005 04:26:09 -0000	1.4
+++ evolution-data-server/servers/exchange/storage/e-storage.c	21 Dec 2005 10:31:32 -0000
@@ -30,7 +30,7 @@
 #include "e-shell-marshal.h"
 
 #include <glib/gi18n-lib.h>
-#include <libedataserver/e-util.h>
+#include <libedataserver/e-data-server-util.h>
 
 #include <string.h>
 
Index: evolution-data-server/src/server.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/src/server.c,v
retrieving revision 1.29
diff -u -p -r1.29 server.c
--- evolution-data-server/src/server.c	25 Nov 2005 03:53:43 -0000	1.29
+++ evolution-data-server/src/server.c	21 Dec 2005 10:31:32 -0000
@@ -48,7 +48,7 @@
 #include <libedata-cal/e-data-cal-factory.h>
 
 #ifdef G_OS_WIN32
-#include <libedataserver/e-util.h>
+#include <libedataserver/e-data-server-util.h>
 #endif
 
 #include "server-interface-check.h"
? evolution/b.list
Index: evolution/a11y/widgets/ea-calendar-item.c
===================================================================
RCS file: /cvs/gnome/evolution/a11y/widgets/ea-calendar-item.c,v
retrieving revision 1.8
diff -u -p -r1.8 ea-calendar-item.c
--- evolution/a11y/widgets/ea-calendar-item.c	17 Jun 2005 15:20:24 -0000	1.8
+++ evolution/a11y/widgets/ea-calendar-item.c	21 Dec 2005 10:51:29 -0000
@@ -30,7 +30,7 @@
 #include <glib/gdate.h>
 #include <e-util/e-util.h>
 #include <libgnome/gnome-i18n.h>
-#include <e-util/e-util.h>
+#include <libedataserver/e-data-server-util.h>
 #include "ea-calendar-item.h"
 #include "ea-calendar-cell.h"
 #include "ea-cell-table.h"
Index: evolution/addressbook/gui/widgets/eab-gui-util.c
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/gui/widgets/eab-gui-util.c,v
retrieving revision 1.46
diff -u -p -r1.46 eab-gui-util.c
--- evolution/addressbook/gui/widgets/eab-gui-util.c	25 Nov 2005 14:56:22 -0000	1.46
+++ evolution/addressbook/gui/widgets/eab-gui-util.c	21 Dec 2005 10:51:30 -0000
@@ -26,6 +26,7 @@
 #include <errno.h>
 #include <string.h>
 
+#include <libedataserver/e-data-server-util.h>
 #include <libedataserverui/e-source-selector.h>
 #include <e-util/e-util.h>
 #include "eab-gui-util.h"
Index: evolution/calendar/gui/calendar-component.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/calendar-component.c,v
retrieving revision 1.211
diff -u -p -r1.211 calendar-component.c
--- evolution/calendar/gui/calendar-component.c	19 Dec 2005 11:23:09 -0000	1.211
+++ evolution/calendar/gui/calendar-component.c	21 Dec 2005 10:51:31 -0000
@@ -31,6 +31,7 @@
 #include <bonobo/bonobo-i18n.h>
 #include <bonobo/bonobo-exception.h>
 #include <libical/icalvcal.h>
+#include <libedataserver/e-data-server-util.h>
 #include <libedataserver/e-url.h>
 #include <libecal/e-cal-time-util.h>
 #include <libedataserverui/e-source-selector.h>
@@ -1626,7 +1627,7 @@ calendar_component_peek (void)
 	if (component == NULL) {
 		component = g_object_new (calendar_component_get_type (), NULL);
 
-		if (e_mkdir_hier (calendar_component_peek_config_directory (component), 0777) != 0) {
+		if (e_util_mkdir_hier (calendar_component_peek_config_directory (component), 0777) != 0) {
 			g_warning (G_STRLOC ": Cannot create directory %s: %s",
 				   calendar_component_peek_config_directory (component),
 				   g_strerror (errno));
Index: evolution/calendar/gui/calendar-config.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/calendar-config.c,v
retrieving revision 1.83
diff -u -p -r1.83 calendar-config.c
--- evolution/calendar/gui/calendar-config.c	19 Dec 2005 11:23:09 -0000	1.83
+++ evolution/calendar/gui/calendar-config.c	21 Dec 2005 10:51:31 -0000
@@ -32,6 +32,7 @@
 #include <string.h>
 #include <time.h>
 #include <libgnomeui/gnome-dialog.h>
+#include <libedataserver/e-data-server-util.h>
 #include <e-util/e-util.h>
 #include <widgets/e-timezone-dialog/e-timezone-dialog.h>
 #include <libecal/e-cal-time-util.h>
Index: evolution/calendar/gui/e-cal-model-tasks.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-cal-model-tasks.c,v
retrieving revision 1.33
diff -u -p -r1.33 e-cal-model-tasks.c
--- evolution/calendar/gui/e-cal-model-tasks.c	17 Dec 2005 13:29:21 -0000	1.33
+++ evolution/calendar/gui/e-cal-model-tasks.c	21 Dec 2005 10:51:31 -0000
@@ -26,7 +26,7 @@
 #include <string.h>
 #include <gtk/gtkmessagedialog.h>
 #include <libgnome/gnome-i18n.h>
-#include <libedataserver/e-util.h>
+#include <libedataserver/e-data-server-util.h>
 #include "calendar-config.h"
 #include "e-cal-model-tasks.h"
 #include "e-cell-date-edit-text.h"
Index: evolution/calendar/gui/e-cal-popup.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-cal-popup.c,v
retrieving revision 1.18
diff -u -p -r1.18 e-cal-popup.c
--- evolution/calendar/gui/e-cal-popup.c	18 Oct 2005 09:58:28 -0000	1.18
+++ evolution/calendar/gui/e-cal-popup.c	21 Dec 2005 10:51:31 -0000
@@ -33,6 +33,7 @@
 #include <libgnomevfs/gnome-vfs-mime.h>
 
 #include "e-cal-popup.h"
+#include <libedataserver/e-data-server-util.h>
 #include <libedataserverui/e-source-selector.h>
 
 #include <camel/camel-mime-part.h>
Index: evolution/calendar/gui/e-cell-date-edit-text.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-cell-date-edit-text.c,v
retrieving revision 1.15
diff -u -p -r1.15 e-cell-date-edit-text.c
--- evolution/calendar/gui/e-cell-date-edit-text.c	24 Nov 2005 15:11:49 -0000	1.15
+++ evolution/calendar/gui/e-cell-date-edit-text.c	21 Dec 2005 10:51:31 -0000
@@ -38,6 +38,7 @@
 #include <libgnomeui/gnome-stock-icons.h> 
 #include <libgnome/gnome-i18n.h>
 #include <libedataserver/e-time-utils.h>
+#include <libedataserver/e-data-server-util.h>
 #include <e-util/e-util.h>
 #include <libecal/e-cal-time-util.h>
 
Index: evolution/calendar/gui/e-meeting-store.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-meeting-store.c,v
retrieving revision 1.15
diff -u -p -r1.15 e-meeting-store.c
--- evolution/calendar/gui/e-meeting-store.c	17 Dec 2005 13:35:24 -0000	1.15
+++ evolution/calendar/gui/e-meeting-store.c	21 Dec 2005 10:51:31 -0000
@@ -33,7 +33,7 @@
 #include <libecal/e-cal-component.h>
 #include <libecal/e-cal-util.h>
 #include <libecal/e-cal-time-util.h>
-#include <libedataserver/e-util.h>
+#include <libedataserver/e-data-server-util.h>
 #include "calendar-config.h"
 #include "itip-utils.h"
 #include "e-meeting-utils.h"
Index: evolution/calendar/gui/memos-component.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/memos-component.c,v
retrieving revision 1.2
diff -u -p -r1.2 memos-component.c
--- evolution/calendar/gui/memos-component.c	6 Dec 2005 05:29:34 -0000	1.2
+++ evolution/calendar/gui/memos-component.c	21 Dec 2005 10:51:31 -0000
@@ -32,6 +32,7 @@
 #include <bonobo/bonobo-exception.h>
 #include <gconf/gconf-client.h>
 #include <libecal/e-cal.h>
+#include <libedataserver/e-data-server-util.h>
 #include <libedataserverui/e-source-selector.h>
 #include <shell/e-user-creatable-items-handler.h>
 #include "e-cal-model.h"
@@ -1296,7 +1297,7 @@ memos_component_peek (void)
 	if (component == NULL) {
 		component = g_object_new (memos_component_get_type (), NULL);
 
-		if (e_mkdir_hier (component->priv->config_directory, 0777) != 0) {
+		if (e_util_mkdir_hier (component->priv->config_directory, 0777) != 0) {
 			g_warning (G_STRLOC ": Cannot create directory %s: %s",
 				   component->priv->config_directory, g_strerror (errno));
 			g_object_unref (component);
Index: evolution/calendar/gui/print.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/print.c,v
retrieving revision 1.77
diff -u -p -r1.77 print.c
--- evolution/calendar/gui/print.c	24 Nov 2005 15:11:49 -0000	1.77
+++ evolution/calendar/gui/print.c	21 Dec 2005 10:51:31 -0000
@@ -45,6 +45,7 @@
 #include <libgnomeprintui/gnome-print-preview.h>
 #include <libgnomeprintui/gnome-print-dialog.h>
 #include <libedataserver/e-time-utils.h>
+#include <libedataserver/e-data-server-util.h>
 #include <e-util/e-util.h>
 #include <e-util/e-dialog-widgets.h>
 #include <e-util/e-print.h>
Index: evolution/calendar/gui/tasks-component.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/tasks-component.c,v
retrieving revision 1.94
diff -u -p -r1.94 tasks-component.c
--- evolution/calendar/gui/tasks-component.c	25 Nov 2005 13:19:17 -0000	1.94
+++ evolution/calendar/gui/tasks-component.c	21 Dec 2005 10:51:31 -0000
@@ -31,6 +31,7 @@
 #include <bonobo/bonobo-exception.h>
 #include <gconf/gconf-client.h>
 #include <libecal/e-cal.h>
+#include <libedataserver/e-data-server-util.h>
 #include <libedataserverui/e-source-selector.h>
 #include <shell/e-user-creatable-items-handler.h>
 #include "e-cal-model.h"
@@ -1320,7 +1321,7 @@ tasks_component_peek (void)
 	if (component == NULL) {
 		component = g_object_new (tasks_component_get_type (), NULL);
 
-		if (e_mkdir_hier (component->priv->config_directory, 0777) != 0) {
+		if (e_util_mkdir_hier (component->priv->config_directory, 0777) != 0) {
 			g_warning (G_STRLOC ": Cannot create directory %s: %s",
 				   component->priv->config_directory, g_strerror (errno));
 			g_object_unref (component);
Index: evolution/e-util/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/e-util/ChangeLog,v
retrieving revision 1.577
diff -u -p -r1.577 ChangeLog
--- evolution/e-util/ChangeLog	19 Dec 2005 11:23:10 -0000	1.577
+++ evolution/e-util/ChangeLog	21 Dec 2005 10:51:32 -0000
@@ -1,3 +1,18 @@
+2005-12-21  Simon Zheng  <Simon Zheng sun com>
+
+	* e-util.c : Use e_util_mkdir_hier() instead of e_mkdir_hier().
+
+	Use e_util_strstrcase() instead of e_strstrcasea().
+
+	Use the copy in evolution-data-server/libedataserver/e-data-
+	server-util.h instead of e_strftime().
+
+	Use the copy in evolution-data-server/libedataserver/e-data-
+	server-util.h instead of e_filename_make_safe().
+
+	Use the copy in evolution-data-server/libedataserver/e-data-
+	server-util.h instead of e_utf8_strftime().	
+
 2005-12-19  Chenthill Palanisamy  <pchenthill novell com>
 
 	committing for David Trowbridge <trowbrds cs colorado edu>
Index: evolution/e-util/e-mktemp.c
===================================================================
RCS file: /cvs/gnome/evolution/e-util/e-mktemp.c,v
retrieving revision 1.13
diff -u -p -r1.13 e-mktemp.c
--- evolution/e-util/e-mktemp.c	17 Dec 2005 15:52:21 -0000	1.13
+++ evolution/e-util/e-mktemp.c	21 Dec 2005 10:51:32 -0000
@@ -36,6 +36,7 @@
 #include <stdio.h>
 #include <time.h>
 
+#include <libedataserver/e-data-server-util.h>
 #include "e-util.h"
 #include "e-mktemp.h"
 
@@ -110,7 +111,7 @@ get_dir (gboolean make)
 #ifdef TEMP_HOME
 	path = g_string_new (g_get_home_dir());
 	g_string_append_printf(path, "/.evolution/cache/tmp");
-	if (make && e_mkdir_hier(path->str, 0777) == -1) {
+	if (make && e_util_mkdir_hier(path->str, 0777) == -1) {
 		g_string_free(path, TRUE);
 		path = NULL;
 	}
Index: evolution/e-util/e-plugin.c
===================================================================
RCS file: /cvs/gnome/evolution/e-util/e-plugin.c,v
retrieving revision 1.19
diff -u -p -r1.19 e-plugin.c
--- evolution/e-util/e-plugin.c	17 Dec 2005 16:31:42 -0000	1.19
+++ evolution/e-util/e-plugin.c	21 Dec 2005 10:51:32 -0000
@@ -26,7 +26,7 @@
 #include <gconf/gconf-client.h>
 
 #include <libedataserver/e-msgport.h>
-#include <libedataserver/e-util.h>
+#include <libedataserver/e-data-server-util.h>
 #include <libedataserver/e-xml-utils.h>
 
 #include "e-plugin.h"
Index: evolution/e-util/e-util.c
===================================================================
RCS file: /cvs/gnome/evolution/e-util/e-util.c,v
retrieving revision 1.69
diff -u -p -r1.69 e-util.c
--- evolution/e-util/e-util.c	17 Dec 2005 11:45:52 -0000	1.69
+++ evolution/e-util/e-util.c	21 Dec 2005 10:51:32 -0000
@@ -44,6 +44,7 @@
 #include <windows.h>
 #endif
 
+#include <libedataserver/e-data-server-util.h>
 #include "e-i18n.h"
 #include "e-util.h"
 #include "e-util-private.h"
@@ -265,59 +266,6 @@ e_write_file_mkstemp(char *filename, con
 	return 0;
 }
 
-/**
- * e_mkdir_hier:
- * @path: a directory path
- * @mode: a mode, as for mkdir(2)
- *
- * This creates the named directory with the given @mode, creating
- * any necessary intermediate directories (with the same @mode).
- *
- * Return value: 0 on success, -1 on error, in which case errno will
- * be set as for mkdir(2).
- **/
-int
-e_mkdir_hier(const char *path, mode_t mode)
-{
-	char *copy, *p;
-
-	if (g_path_is_absolute (path)) {
-		p = copy = g_strdup (path);
-	} else {
-		gchar *current_dir = g_get_current_dir();
-		p = copy = g_build_filename (current_dir, path, NULL);
-		g_free (current_dir);
-	}
-
-	p = (char *)g_path_skip_root (p);
-	do {
-		char *p1 = strchr (p, '/');
-#ifdef G_OS_WIN32
-		{
-			char *p2 = strchr (p, '\\');
-			if (p1 == NULL ||
-			    (p2 != NULL && p2 < p1))
-				p1 = p2;
-		}
-#endif
-		p = p1;
-		if (p)
-			*p = '\0';
-		if (!g_file_test (copy, G_FILE_TEST_IS_DIR)) {
-			if (g_mkdir (copy, mode) == -1) {
-				g_free (copy);
-				return -1;
-			}
-		}
-		if (p) {
-			*p++ = '/';
-		}
-	} while (p);
-
-	g_free (copy);
-	return 0;
-}
-
 #if 0
 char *
 e_read_uri(const char *uri)
@@ -418,72 +366,6 @@ e_strsplit (const gchar *string,
   return str_array;
 }
 
-gchar *
-e_strstrcase (const gchar *haystack, const gchar *needle)
-{
-	/* find the needle in the haystack neglecting case */
-	const gchar *ptr;
-	guint len;
-
-	g_return_val_if_fail (haystack != NULL, NULL);
-	g_return_val_if_fail (needle != NULL, NULL);
-
-	len = strlen(needle);
-	if (len > strlen(haystack))
-		return NULL;
-
-	if (len == 0)
-		return (gchar *) haystack;
-
-	for (ptr = haystack; *(ptr + len - 1) != '\0'; ptr++)
-		if (!g_ascii_strncasecmp (ptr, needle, len))
-			return (gchar *) ptr;
-
-	return NULL;
-}
-
-/* This only makes a filename safe for usage as a filename.  It still may have shell meta-characters in it. */
-
-/* This code is rather misguided and mostly pointless, but can't be
- * changed because of backward compatibility, I guess.
- *
- * It replaces some perfectly safe characters like '%' with an
- * underscore. (Recall that on Unix, the only bytes not allowed in a
- * file name component are '\0' and '/'.) On the other hand, the UTF-8
- * for a printable non-ASCII Unicode character (that thus consists of
- * several very nonprintable non-ASCII bytes) is let through as
- * such. But those bytes are of course also allowed in filenames, so
- * it doesn't matter as such...
- */
-void
-e_filename_make_safe (gchar *string)
-{
-	gchar *p, *ts;
-	gunichar c;
-#ifdef G_OS_WIN32
-	const char *unsafe_chars = " /'\"`&();|<>$%{}!\\:*?";
-#else
-	const char *unsafe_chars = " /'\"`&();|<>$%{}!";
-#endif	
-	
-	g_return_if_fail (string != NULL);
-	p = string;
-
-	while(p && *p) {
-		c = g_utf8_get_char (p);
-		ts = p;
-		p = g_utf8_next_char (p);
-		/* I wonder what this code is supposed to actually
-		 * achieve, and whether it does that as currently
-		 * written?
-		 */
-		if (!g_unichar_isprint(c) || ( c < 0xff && strchr (unsafe_chars, c&0xff ))) {
-			while (ts<p) 	
-				*ts++ = '_';
-		}
-	}
-}
-
 static gint
 epow10 (gint number) {
 	gint value;
@@ -685,7 +567,7 @@ e_format_number_float (gfloat number)
 gboolean
 e_create_directory (gchar *directory)
 {
-	gint ret_val = e_mkdir_hier (directory, 0777);
+	gint ret_val = e_util_mkdir_hier (directory, 0777);
 	if (ret_val == -1)
 		return FALSE;
 	else
@@ -795,70 +677,6 @@ e_sort (void             *base,
 	memcpy(base, base_copy, nmemb * size);
 	g_free(base_copy);
 #endif
-}
-
-size_t e_strftime(char *s, size_t max, const char *fmt, const struct tm *tm)
-{
-#ifdef HAVE_LKSTRFTIME
-	return strftime(s, max, fmt, tm);
-#else
-	char *c, *ffmt, *ff;
-	size_t ret;
-
-	ffmt = g_strdup(fmt);
-	ff = ffmt;
-	while ((c = strstr(ff, "%l")) != NULL) {
-		c[1] = 'I';
-		ff = c;
-	}
-
-	ff = ffmt;
-	while ((c = strstr(ff, "%k")) != NULL) {
-		c[1] = 'H';
-		ff = c;
-	}
-
-	ret = strftime(s, max, ffmt, tm);
-	g_free(ffmt);
-	return ret;
-#endif
-}
-
-size_t 
-e_utf8_strftime(char *s, size_t max, const char *fmt, const struct tm *tm)
-{
-	size_t sz, ret;
-	char *locale_fmt, *buf;
-
-	locale_fmt = g_locale_from_utf8(fmt, -1, NULL, &sz, NULL);
-	if (!locale_fmt)
-		return 0;
-
-	ret = e_strftime(s, max, locale_fmt, tm);
-	if (!ret) {
-		g_free (locale_fmt);
-		return 0;
-	}
-
-	buf = g_locale_to_utf8(s, ret, NULL, &sz, NULL);
-	if (!buf) {
-		g_free (locale_fmt);
-		return 0;
-	}
-
-	if (sz >= max) {
-		char *tmp = buf + max - 1;
-		tmp = g_utf8_find_prev_char(buf, tmp);
-		if (tmp)
-			sz = tmp - buf;
-		else
-			sz = 0;
-	}
-	memcpy(s, buf, sz);
-	s[sz] = '\0';
-	g_free(locale_fmt);
-	g_free(buf);
-	return sz;
 }
 
 /**
Index: evolution/e-util/e-util.h
===================================================================
RCS file: /cvs/gnome/evolution/e-util/e-util.h,v
retrieving revision 1.58
diff -u -p -r1.58 e-util.h
--- evolution/e-util/e-util.h	9 Dec 2005 11:01:14 -0000	1.58
+++ evolution/e-util/e-util.h	21 Dec 2005 10:51:32 -0000
@@ -156,16 +156,11 @@ int       e_write_file                  
 									    int                flags);
 int       e_write_file_mkstemp                                             (char              *filename,
 									    const char        *data);
-int       e_mkdir_hier                                                     (const char        *path,
-									    mode_t             mode);
 
 gchar   **e_strsplit                                                	   (const gchar      *string,
 								    	    const gchar      *delimiter,
 								    	    gint              max_tokens);
-gchar    *e_strstrcase                                                     (const gchar       *haystack,
-									    const gchar       *needle);
 /* This only makes a filename safe for usage as a filename.  It still may have shell meta-characters in it. */
-void      e_filename_make_safe                                             (gchar             *string);
 gchar    *e_format_number                                                  (gint               number);
 gchar    *e_format_number_float                                            (gfloat             number);
 gboolean  e_create_directory                                               (gchar             *directory);
@@ -193,20 +188,11 @@ size_t   e_strftime_fix_am_pm  (char    
 				const char       *fmt,
 				const struct tm  *tm);
 
-size_t   e_strftime		(char              *s,
-				 size_t             max,
-				 const char        *fmt,
-				 const struct tm   *tm);
-
 size_t   e_utf8_strftime_fix_am_pm  (char             *s,
 				     size_t            max,
 				     const char       *fmt,
 				     const struct tm  *tm);
 
-size_t   e_utf8_strftime	(char              *s,
-				 size_t             max,
-				 const char        *fmt,
-				 const struct tm   *tm);
 
 /* String to/from double conversion functions */
 gdouble   e_flexible_strtod     (const gchar       *nptr,
Index: evolution/mail/em-composer-utils.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-composer-utils.c,v
retrieving revision 1.46
diff -u -p -r1.46 em-composer-utils.c
--- evolution/mail/em-composer-utils.c	23 Nov 2005 06:46:51 -0000	1.46
+++ evolution/mail/em-composer-utils.c	21 Dec 2005 10:51:32 -0000
@@ -27,6 +27,7 @@
 #include <string.h>
 #include <gtk/gtkdialog.h>
 
+#include <libedataserver/e-data-server-util.h>
 #include <e-util/e-util.h>
 #include <libgnome/gnome-i18n.h>
 
Index: evolution/mail/em-folder-tree-model.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-folder-tree-model.c,v
retrieving revision 1.73
diff -u -p -r1.73 em-folder-tree-model.c
--- evolution/mail/em-folder-tree-model.c	20 Dec 2005 06:34:12 -0000	1.73
+++ evolution/mail/em-folder-tree-model.c	21 Dec 2005 10:51:32 -0000
@@ -35,6 +35,7 @@
 #include <libxml/parser.h>
 
 #include <libedataserver/e-xml-utils.h>
+#include <libedataserver/e-data-server-util.h>
 
 #include <e-util/e-mktemp.h>
 
@@ -1052,7 +1053,7 @@ em_folder_tree_model_save_state (EMFolde
 		return;
 	
 	dirname = g_path_get_dirname (model->filename);
-	if (camel_mkdir (dirname, 0777) == -1 && errno != EEXIST) {
+	if (e_util_mkdir_hier (dirname, 0777) == -1 && errno != EEXIST) {
 		g_free (dirname);
 		return;
 	}
Index: evolution/mail/em-format-html.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-format-html.c,v
retrieving revision 1.84
diff -u -p -r1.84 em-format-html.c
--- evolution/mail/em-format-html.c	18 Dec 2005 08:24:26 -0000	1.84
+++ evolution/mail/em-format-html.c	21 Dec 2005 10:51:33 -0000
@@ -41,7 +41,7 @@
 #endif
 
 #include <libedataserver/e-iconv.h>
-#include <libedataserver/e-util.h>	/* for e_utf8_strftime, what about e_time_format_time? */
+#include <libedataserver/e-data-server-util.h>	/* for e_utf8_strftime, what about e_time_format_time? */
 #include <libedataserver/e-time-utils.h>
 #include "e-util/e-icon-factory.h"
 #include "e-util/e-util-private.h"
Index: evolution/mail/em-migrate.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-migrate.c,v
retrieving revision 1.51
diff -u -p -r1.51 em-migrate.c
--- evolution/mail/em-migrate.c	18 Dec 2005 08:24:26 -0000	1.51
+++ evolution/mail/em-migrate.c	21 Dec 2005 10:51:33 -0000
@@ -57,6 +57,7 @@
 #include <libgnome/gnome-i18n.h>
 
 #include <e-util/e-util.h>
+#include <libedataserver/e-data-server-util.h>
 #include <libedataserver/e-iconv.h>
 #include <e-util/e-xml-utils.h>
 
@@ -1521,7 +1522,7 @@ cp_r (const char *src, const char *dest,
 	struct stat st;
 	DIR *dir;
 	
-	if (camel_mkdir (dest, 0777) == -1)
+	if (e_util_mkdir_hier (dest, 0777) == -1)
 		return -1;
 	
 	if (!(dir = opendir (src)))
@@ -1642,7 +1643,7 @@ em_migrate_folder(EMMigrateSession *sess
 		slen = src->len;
 		dlen = dest->len;
 		
-		if (camel_mkdir (dest->str, 0777) == -1 && errno != EEXIST) {
+		if (e_util_mkdir_hier (dest->str, 0777) == -1 && errno != EEXIST) {
 			camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
 					     _("Unable to create new folder `%s': %s"),
 					     dest->str, g_strerror(errno));
@@ -2071,7 +2072,7 @@ em_migrate_pop_uid_caches_1_4 (const cha
 	g_free (cache_dir);
 	
 	cache_dir = g_build_filename (evolution_dir, "mail", "pop", NULL);
-	if (camel_mkdir (cache_dir, 0777) == -1) {
+	if (e_util_mkdir_hier (cache_dir, 0777) == -1) {
 		camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
 				      _("Unable to create POP3 keep-on-server data directory `%s': %s"),
 				      cache_dir, g_strerror(errno));
@@ -2099,7 +2100,7 @@ em_migrate_pop_uid_caches_1_4 (const cha
 		/* strip the trailing '_' */
 		g_string_truncate (newpath, newpath->len - 1);
 		
-		if (camel_mkdir (newpath->str, 0777) == -1
+		if (e_util_mkdir_hier (newpath->str, 0777) == -1
 		    || cp(oldpath->str, (g_string_append(newpath, "/uid-cache"))->str, FALSE, CP_UNIQUE)) {
 			camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
 					      _("Unable to copy POP3 keep-on-server data `%s': %s"),
@@ -2159,7 +2160,7 @@ em_migrate_folder_expand_state_1_4 (cons
 	
 	destpath = g_string_new (evolution_dir);
 	g_string_append (destpath, "/mail/config");
-	if (camel_mkdir (destpath->str, 0777) == -1 || !(dir = opendir (srcpath->str))) {
+	if (e_util_mkdir_hier (destpath->str, 0777) == -1 || !(dir = opendir (srcpath->str))) {
 		g_string_free (destpath, TRUE);
 		g_string_free (srcpath, TRUE);
 		return 0;
@@ -2257,7 +2258,7 @@ em_migrate_folder_view_settings_1_4 (con
 	
 	destpath = g_string_new (evolution_dir);
 	g_string_append (destpath, "/mail/views");
-	if (camel_mkdir (destpath->str, 0777) == -1 || !(dir = opendir (srcpath->str))) {
+	if (e_util_mkdir_hier (destpath->str, 0777) == -1 || !(dir = opendir (srcpath->str))) {
 		g_string_free (destpath, TRUE);
 		g_string_free (srcpath, TRUE);
 		return 0;
@@ -2473,7 +2474,7 @@ em_migrate_imap_cmeta_1_4(const char *ev
 							       url->host?url->host:"");
 
 					dir = e_path_to_physical(base, path);
-					if (camel_mkdir(dir, 0777) == 0) {
+					if (e_util_mkdir_hier(dir, 0777) == 0) {
 						char *cmeta;
 						FILE *fp;
 
@@ -2571,7 +2572,7 @@ em_migrate_1_4 (const char *evolution_di
 	
 	path = g_strdup_printf ("mbox:%s/.evolution/mail/local", g_get_home_dir ());
 	if (stat (path + 5, &st) == -1) {
-		if (errno != ENOENT || camel_mkdir (path + 5, 0777) == -1) {
+		if (errno != ENOENT || e_util_mkdir_hier (path + 5, 0777) == -1) {
 			camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
 					      _("Failed to create local mail storage `%s': %s"),
 					      path + 5, g_strerror (errno));
@@ -2653,7 +2654,7 @@ emm_setup_initial(const char *evolution_
 	d(printf("Setting up initial mail tree\n"));
 	
 	base = g_build_filename(evolution_dir, "mail/local", NULL);
-	if (camel_mkdir(base, 0777) == -1 && errno != EEXIST) {
+	if (e_util_mkdir_hier(base, 0777) == -1 && errno != EEXIST) {
 		g_free(base);
 		return -1;
 	}
@@ -2706,7 +2707,7 @@ em_migrate (const char *evolution_dir, i
 	/* make sure ~/.evolution/mail exists */
 	path = g_build_filename (evolution_dir, "mail", NULL);
 	if (g_stat (path, &st) == -1) {
-		if (errno != ENOENT || camel_mkdir (path, 0777) == -1) {
+		if (errno != ENOENT || e_util_mkdir_hier (path, 0777) == -1) {
 			camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM, 
 					      _("Unable to create local mail folders at `%s': %s"),
 					      path, g_strerror (errno));
Index: evolution/mail/em-popup.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-popup.c,v
retrieving revision 1.38
diff -u -p -r1.38 em-popup.c
--- evolution/mail/em-popup.c	18 Oct 2005 08:31:39 -0000	1.38
+++ evolution/mail/em-popup.c	21 Dec 2005 10:51:33 -0000
@@ -63,6 +63,7 @@
 #include <gconf/gconf.h>
 #include <gconf/gconf-client.h>
 
+#include <libedataserver/e-data-server-util.h>
 #include <e-util/e-util.h>
 #include "e-attachment.h"
 
Index: evolution/mail/em-utils.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-utils.c,v
retrieving revision 1.69
diff -u -p -r1.69 em-utils.c
--- evolution/mail/em-utils.c	18 Dec 2005 08:24:26 -0000	1.69
+++ evolution/mail/em-utils.c	21 Dec 2005 10:51:33 -0000
@@ -68,6 +68,7 @@
 #include "mail-config.h"
 #include "message-tag-followup.h"
 
+#include <libedataserver/e-data-server-util.h>
 #include "e-util/e-util.h"
 #include "e-util/e-util-private.h"
 #include "e-util/e-mktemp.h"
@@ -592,7 +593,7 @@ em_utils_save_part_to_file(GtkWidget *pa
 		return FALSE;
 	
 	dirname = g_path_get_dirname(filename);
-	if (camel_mkdir(dirname, 0777) == -1) {
+	if (e_util_mkdir_hier(dirname, 0777) == -1) {
 		e_error_run((GtkWindow *)parent, "mail:no-create-path", filename, g_strerror(errno), NULL);
 		g_free(dirname);
 		return FALSE;
Index: evolution/mail/mail-component.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/mail-component.c,v
retrieving revision 1.126
diff -u -p -r1.126 mail-component.c
--- evolution/mail/mail-component.c	18 Dec 2005 08:24:26 -0000	1.126
+++ evolution/mail/mail-component.c	21 Dec 2005 10:51:34 -0000
@@ -35,6 +35,7 @@
 #include <fcntl.h>
 #include <errno.h>
 
+#include <libedataserver/e-data-server-util.h>
 #include "em-utils.h"
 #include "em-composer-utils.h"
 #include "em-format.h"
@@ -1048,7 +1049,7 @@ mail_component_init (MailComponent *comp
 			*p++ = '/';
 	}
 #endif
-	if (camel_mkdir (priv->base_directory, 0777) == -1 && errno != EEXIST)
+	if (e_util_mkdir_hier (priv->base_directory, 0777) == -1 && errno != EEXIST)
 		abort ();
 	
 	priv->model = em_folder_tree_model_new (priv->base_directory);
Index: evolution/mail/mail-config.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/mail-config.c,v
retrieving revision 1.322
diff -u -p -r1.322 mail-config.c
--- evolution/mail/mail-config.c	18 Dec 2005 08:24:26 -0000	1.322
+++ evolution/mail/mail-config.c	21 Dec 2005 10:51:34 -0000
@@ -55,6 +55,7 @@
 #include <bonobo/bonobo-moniker-util.h>
 #include <bonobo/bonobo-exception.h>
 
+#include <libedataserver/e-data-server-util.h>
 #include <e-util/e-util.h>
 #include <misc/e-gui-utils.h>
 
Index: evolution/mail/mail-folder-cache.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/mail-folder-cache.c,v
retrieving revision 1.104
diff -u -p -r1.104 mail-folder-cache.c
--- evolution/mail/mail-folder-cache.c	20 Dec 2005 06:34:12 -0000	1.104
+++ evolution/mail/mail-folder-cache.c	21 Dec 2005 10:51:34 -0000
@@ -46,6 +46,7 @@
 #include <camel/camel-offline-store.h>
 #include <camel/camel-disco-store.h>
 
+#include <libedataserver/e-data-server-util.h>
 #include "e-util/e-util.h"
 
 #include "mail-mt.h"
Index: evolution/mail/mail-mt.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/mail-mt.c,v
retrieving revision 1.91
diff -u -p -r1.91 mail-mt.c
--- evolution/mail/mail-mt.c	17 Dec 2005 17:35:53 -0000	1.91
+++ evolution/mail/mail-mt.c	21 Dec 2005 10:51:34 -0000
@@ -30,7 +30,7 @@
 #include <libgnome/gnome-i18n.h>
 
 #include <libedataserver/e-msgport.h>
-#include <libedataserver/e-util.h>
+#include <libedataserver/e-data-server-util.h>
 
 #include <camel/camel-url.h>
 #include <camel/camel-operation.h>
Index: evolution/mail/mail-ops.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/mail-ops.c,v
retrieving revision 1.453
diff -u -p -r1.453 mail-ops.c
--- evolution/mail/mail-ops.c	17 Dec 2005 17:39:11 -0000	1.453
+++ evolution/mail/mail-ops.c	21 Dec 2005 10:51:34 -0000
@@ -54,6 +54,7 @@
 
 #include "composer/e-msg-composer.h"
 
+#include <libedataserver/e-data-server-util.h>
 #include "e-util/e-util.h"
 #include "e-util/e-util-private.h"
 
Index: evolution/mail/mail-tools.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/mail-tools.c,v
retrieving revision 1.141
diff -u -p -r1.141 mail-tools.c
--- evolution/mail/mail-tools.c	17 Dec 2005 17:49:12 -0000	1.141
+++ evolution/mail/mail-tools.c	21 Dec 2005 10:51:34 -0000
@@ -47,6 +47,7 @@
 #include "filter/filter-option.h"
 #include "filter/filter-input.h"
 
+#include <libedataserver/e-data-server-util.h>
 #include "em-utils.h"
 #include "em-vfolder-context.h"
 #include "em-vfolder-rule.h"
@@ -116,7 +117,7 @@ mail_tool_get_local_movemail_path (const
 			*c = '_';
 
 	path = g_strdup_printf("%s/mail/spool", mail_component_peek_base_directory(NULL));
-	if (g_stat(path, &st) == -1 && camel_mkdir(path, 0777) == -1) {
+	if (g_stat(path, &st) == -1 && e_util_mkdir_hier(path, 0777) == -1) {
 		camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM, _("Could not create spool directory `%s': %s"),
 				     path, g_strerror(errno));
 		g_free(path);
Index: evolution/plugins/itip-formatter/itip-view.c
===================================================================
RCS file: /cvs/gnome/evolution/plugins/itip-formatter/itip-view.c,v
retrieving revision 1.19
diff -u -p -r1.19 itip-view.c
--- evolution/plugins/itip-formatter/itip-view.c	24 Nov 2005 14:28:38 -0000	1.19
+++ evolution/plugins/itip-formatter/itip-view.c	21 Dec 2005 10:51:35 -0000
@@ -34,6 +34,7 @@
 #include <camel/camel-medium.h>
 #include <camel/camel-mime-message.h>
 #include <libedataserver/e-time-utils.h>
+#include <libedataserver/e-data-server-util.h>
 #include <libedataserverui/e-source-option-menu.h>
 #include <libecal/e-cal.h>
 #include <libecal/e-cal-time-util.h>
Index: evolution/plugins/save-calendar/csv-format.c
===================================================================
RCS file: /cvs/gnome/evolution/plugins/save-calendar/csv-format.c,v
retrieving revision 1.12
diff -u -p -r1.12 csv-format.c
--- evolution/plugins/save-calendar/csv-format.c	16 May 2005 06:21:48 -0000	1.12
+++ evolution/plugins/save-calendar/csv-format.c	21 Dec 2005 10:51:35 -0000
@@ -35,7 +35,7 @@
 #include <gtk/gtk.h>
 #include <libedataserver/e-source.h>
 #include <libecal/e-cal-time-util.h>
-#include <libedataserver/e-util.h>
+#include <libedataserver/e-data-server-util.h>
 #include <libedataserverui/e-source-selector.h>
 #include <libecal/e-cal.h>
 #include "calendar/common/authentication.h"
Index: evolution/plugins/save-calendar/rdf-format.c
===================================================================
RCS file: /cvs/gnome/evolution/plugins/save-calendar/rdf-format.c,v
retrieving revision 1.10
diff -u -p -r1.10 rdf-format.c
--- evolution/plugins/save-calendar/rdf-format.c	16 May 2005 06:21:48 -0000	1.10
+++ evolution/plugins/save-calendar/rdf-format.c	21 Dec 2005 10:51:35 -0000
@@ -39,7 +39,7 @@
 #include <calendar/gui/e-cal-popup.h>
 #include <libgnomevfs/gnome-vfs.h>
 #include <libecal/e-cal-time-util.h>
-#include <libedataserver/e-util.h>
+#include <libedataserver/e-data-server-util.h>
 #include <libxml/xmlmemory.h>
 #include <libxml/parser.h>
 #include <libxml/tree.h>
Index: evolution/smime/lib/e-cert.c
===================================================================
RCS file: /cvs/gnome/evolution/smime/lib/e-cert.c,v
retrieving revision 1.11
diff -u -p -r1.11 e-cert.c
--- evolution/smime/lib/e-cert.c	17 Jun 2005 15:20:31 -0000	1.11
+++ evolution/smime/lib/e-cert.c	21 Dec 2005 10:51:35 -0000
@@ -63,6 +63,7 @@
 #include <time.h>
 
 #include <libgnome/gnome-i18n.h>
+#include <libedataserver/e-data-server-util.h>
 #include <e-util/e-util.h>	/* for e_utf8_strftime, what about e_time_format_time? */
 
 #include "e-cert.h"
Index: evolution/widgets/menus/gal-view-instance.c
===================================================================
RCS file: /cvs/gnome/evolution/widgets/menus/gal-view-instance.c,v
retrieving revision 1.21
diff -u -p -r1.21 gal-view-instance.c
--- evolution/widgets/menus/gal-view-instance.c	18 Dec 2005 08:44:40 -0000	1.21
+++ evolution/widgets/menus/gal-view-instance.c	21 Dec 2005 10:51:35 -0000
@@ -34,6 +34,7 @@
 #include <libgnome/gnome-util.h>
 #include <glib/gstdio.h>
 #include <libedataserver/e-xml-utils.h>
+#include <libedataserver/e-data-server-util.h>
 
 #include "e-util/e-i18n.h"
 #include "e-util/e-util.h"
Index: evolution/widgets/misc/e-attachment-bar.c
===================================================================
RCS file: /cvs/gnome/evolution/widgets/misc/e-attachment-bar.c,v
retrieving revision 1.13
diff -u -p -r1.13 e-attachment-bar.c
--- evolution/widgets/misc/e-attachment-bar.c	17 Nov 2005 04:41:41 -0000	1.13
+++ evolution/widgets/misc/e-attachment-bar.c	21 Dec 2005 10:51:35 -0000
@@ -40,6 +40,7 @@
 #include "e-attachment-bar.h"
 
 #include <libedataserver/e-iconv.h>
+#include <libedataserver/e-data-server-util.h>
 
 #include <camel/camel-data-wrapper.h>
 #include <camel/camel-mime-message.h>
Index: evolution/widgets/misc/e-calendar-item.c
===================================================================
RCS file: /cvs/gnome/evolution/widgets/misc/e-calendar-item.c,v
retrieving revision 1.46
diff -u -p -r1.46 e-calendar-item.c
--- evolution/widgets/misc/e-calendar-item.c	24 Aug 2005 03:09:00 -0000	1.46
+++ evolution/widgets/misc/e-calendar-item.c	21 Dec 2005 10:51:36 -0000
@@ -44,6 +44,7 @@
 #include <gtk/gtksignal.h>
 #include <gdk/gdkkeysyms.h>
 #include <libgnome/gnome-i18n.h>
+#include <libedataserver/e-data-server-util.h>
 #include <e-util/e-util.h>
 
 static const int e_calendar_item_days_in_month[12] = {
Index: evolution/widgets/misc/e-dateedit.c
===================================================================
RCS file: /cvs/gnome/evolution/widgets/misc/e-dateedit.c,v
retrieving revision 1.49
diff -u -p -r1.49 e-dateedit.c
--- evolution/widgets/misc/e-dateedit.c	24 Nov 2005 14:23:23 -0000	1.49
+++ evolution/widgets/misc/e-dateedit.c	21 Dec 2005 10:51:36 -0000
@@ -60,6 +60,7 @@
 #include <atk/atkrelationset.h>
 #include <libgnome/gnome-i18n.h>
 #include <libedataserver/e-time-utils.h>
+#include <libedataserver/e-data-server-util.h>
 #include <e-util/e-util.h>
 #include "e-calendar.h"
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]