aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-migrate.c
diff options
context:
space:
mode:
authorSimon Zheng <simon.zheng@sun.com>2006-01-10 16:10:30 +0800
committerHarry Lu <haip@src.gnome.org>2006-01-10 16:10:30 +0800
commit3e82887a540bab50ee5e15eb4bc7e143e5bb34f1 (patch)
treef7a632d980d0b7824fbfb4ce9cf940af1f10a257 /mail/em-migrate.c
parente459ad918e6453c8a0be1415a22311bdeabb06a8 (diff)
downloadgsoc2013-evolution-3e82887a540bab50ee5e15eb4bc7e143e5bb34f1.tar.gz
gsoc2013-evolution-3e82887a540bab50ee5e15eb4bc7e143e5bb34f1.tar.zst
gsoc2013-evolution-3e82887a540bab50ee5e15eb4bc7e143e5bb34f1.zip
Use e_util_mkdir_hier() instead of e_mkdir_hier().
2006-01-10 Simon Zheng <simon.zheng@sun.com> * em-composer-utils.c: * em-folder-tree-model.c: (em_folder_tree_model_save_state): * em-format-html.c: * em-migrate.c: (cp_r), (em_migrate_folder), (em_migrate_pop_uid_caches_1_4), (em_migrate_folder_expand_state_1_4), (em_migrate_folder_view_settings_1_4), (em_migrate_imap_cmeta_1_4), (em_migrate_1_4), (emm_setup_initial), (em_migrate): * em-popup.c: * em-utils.c: (em_utils_save_part_to_file): * mail-component.c: (mail_component_init): * mail-config.c: * mail-folder-cache.c: * mail-mt.c: * mail-ops.c: * mail-tools.c: (mail_tool_get_local_movemail_path): Use e_util_mkdir_hier() instead of e_mkdir_hier(). Use e_util_strstrcase() instead of e_strstrcasea(). use e_strftime() in evolution-data-server/ libedataserver/e-data-server-util.c instead of the copy in evolution/e-util/e-util.c. use e_filename_make_safe() in evolution-data-server/ libedataserver/e-data-server-util.c instead of the copy in evolution/e-util/e-util.c. use e_utf8_strftime() in evolution-data-server/ libedataserver/e-data-server-util.c instead of the copy in evolution/e-util/e-util.c. svn path=/trunk/; revision=31118
Diffstat (limited to 'mail/em-migrate.c')
-rw-r--r--mail/em-migrate.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/mail/em-migrate.c b/mail/em-migrate.c
index 6ac7445ea4..f5ae170683 100644
--- a/mail/em-migrate.c
+++ b/mail/em-migrate.c
@@ -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, const char *pattern, int mode)
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 *session, const char *dirname, const char *fu
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 char *evolution_dir, CamelException *ex)
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 char *evolution_dir, CamelException *ex)
/* 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 (const char *evolution_dir, CamelException *e
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 (const char *evolution_dir, CamelException *
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 *evolution_dir, CamelException *ex)
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_dir, xmlDocPtr filters, xmlDocPtr vfolders
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_dir)
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, int major, int minor, int revision, Camel
/* 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));