if (link(file, destfile) < 0) {
if (copy_file(file, destfile, TRUE) < 0) {
- g_warning(_("can't copy message %s to %s\n"),
+ g_warning("can't copy message %s to %s\n",
file, destfile);
g_free(destfile);
return -1;
g_return_val_if_fail(msginfo != NULL, -1);
if (msginfo->folder == dest) {
- g_warning(_("the src folder is identical to the dest.\n"));
+ g_warning("the src folder is identical to the dest.\n");
return -1;
}
destdir = folder_item_get_path(dest);
if ((fp = procmsg_open_mark_file(destdir, TRUE)) == NULL)
- g_warning(_("Can't open mark file.\n"));
+ g_warning("Can't open mark file.\n");
else {
SET_DEST_MSG_FLAGS(fp, dest, msginfo);
fclose(fp);
msginfo = (MsgInfo *)cur->data;
if (msginfo->folder == dest) {
- g_warning(_("the src folder is identical to the dest.\n"));
+ g_warning("the src folder is identical to the dest.\n");
continue;
}
debug_print("Moving message %s%c%d to %s ...\n",
g_return_val_if_fail(msginfo != NULL, -1);
if (msginfo->folder == dest) {
- g_warning(_("the src folder is identical to the dest.\n"));
+ g_warning("the src folder is identical to the dest.\n");
return -1;
}
msginfo->msgnum, dest->path);
- if (copy_file(srcfile, destfile, TRUE) < 0) {
+ if ((MSG_IS_QUEUED(msginfo->flags) || MSG_IS_DRAFT(msginfo->flags))
+ && dest->stype != F_QUEUE && dest->stype != F_DRAFT) {
+ if (procmsg_remove_special_headers(srcfile, destfile) !=0) {
+ g_free(srcfile);
+ g_free(destfile);
+ return -1;
+ }
+ } else if (copy_file(srcfile, destfile, TRUE) < 0) {
FILE_OP_ERROR(srcfile, "copy");
g_free(srcfile);
g_free(destfile);
return -1;
}
+
if (prefs && prefs->enable_folder_chmod && prefs->folder_chmod) {
if (chmod(destfile, prefs->folder_chmod) < 0)
FILE_OP_ERROR(destfile, "chmod");
msginfo = (MsgInfo *)cur->data;
if (msginfo->folder == dest) {
- g_warning(_("the src folder is identical to the dest.\n"));
+ g_warning("the src folder is identical to the dest.\n");
continue;
}
debug_print("Copying message %s%c%d to %s ...\n",
{ \
if (!is_dir_exist(dir)) { \
if (is_file_exist(dir)) { \
- g_warning(_("File `%s' already exists.\n" \
- "Can't create folder."), dir); \
+ g_warning("File `%s' already exists.\n" \
+ "Can't create folder.", dir); \
return -1; \
} \
if (make_dir(dir) < 0) \
gchar *path;
gchar *fullpath;
FolderItem *new_item;
+ gchar *mh_sequences_filename;
+ FILE *mh_sequences_file;
g_return_val_if_fail(folder != NULL, NULL);
g_return_val_if_fail(parent != NULL, NULL);
path = g_strdup(name);
new_item = folder_item_new(folder, name, path);
folder_item_append(parent, new_item);
+
g_free(path);
+ path = folder_item_get_path(new_item);
+ mh_sequences_filename = g_strconcat(path, G_DIR_SEPARATOR_S,
+ ".mh_sequences", NULL);
+ if ((mh_sequences_file = fopen(mh_sequences_filename, "a+b")) != NULL) {
+ fclose(mh_sequences_file);
+ }
+ g_free(mh_sequences_filename);
+
return new_item;
}