aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-migrate.c
diff options
context:
space:
mode:
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));