}
closedir(dp);
- debug_print(_("Last number in dir %s = %d\n"), item->path, max);
+ debug_print("Last number in dir %s = %d\n", item->path, max);
item->last_num = max;
}
g_return_val_if_fail(destfile != NULL, -1);
if (link(file, destfile) < 0) {
- if (copy_file(file, destfile) < 0) {
+ if (copy_file(file, destfile, TRUE) < 0) {
g_warning(_("can't copy message %s to %s\n"),
file, destfile);
g_free(destfile);
prefs = dest->prefs;
destfile = mh_get_new_msg_filename(dest);
- g_return_val_if_fail(destfile != NULL, -1);
+ if (!destfile) return -1;
- debug_print(_("Moving message %s%c%d to %s ...\n"),
+ srcfile = procmsg_get_message_file(msginfo);
+
+ debug_print("Moving message %s%c%d to %s ...\n",
msginfo->folder->path, G_DIR_SEPARATOR,
msginfo->msgnum, dest->path);
- srcfile = procmsg_get_message_file(msginfo);
-
- destfile = mh_get_new_msg_filename(dest);
- if(!destfile) return -1;
- srcfile = procmsg_get_message_file(msginfo);
-
- if (move_file(srcfile, destfile) < 0) {
+ if (move_file(srcfile, destfile, FALSE) < 0) {
g_free(srcfile);
g_free(destfile);
return -1;
g_warning(_("the src folder is identical to the dest.\n"));
continue;
}
- debug_print(_("Moving message %s%c%d to %s ...\n"),
+ debug_print("Moving message %s%c%d to %s ...\n",
msginfo->folder->path, G_DIR_SEPARATOR,
msginfo->msgnum, dest->path);
destfile = mh_get_new_msg_filename(dest);
- if (!destfile) break;
+ if (!destfile) return -1;
srcfile = procmsg_get_message_file(msginfo);
- destfile = mh_get_new_msg_filename(dest);
- if(!destfile) return -1;
- if (move_file(srcfile, destfile) < 0) {
+ if (move_file(srcfile, destfile, FALSE) < 0) {
g_free(srcfile);
g_free(destfile);
break;
prefs = dest->prefs;
- destfile = mh_get_new_msg_filename(dest);
- g_return_val_if_fail(destfile != NULL, -1);
-
- debug_print(_("Copying message %s%c%d to %s ...\n"),
- msginfo->folder->path, G_DIR_SEPARATOR,
- msginfo->msgnum, dest->path);
-
srcfile = procmsg_get_message_file(msginfo);
destfile = mh_get_new_msg_filename(dest);
- if(!destfile) {
+ if (!destfile) {
g_free(srcfile);
return -1;
}
- if (copy_file(srcfile, destfile) < 0) {
+ debug_print("Copying message %s%c%d to %s ...\n",
+ msginfo->folder->path, G_DIR_SEPARATOR,
+ msginfo->msgnum, dest->path);
+
+
+ if (copy_file(srcfile, destfile, TRUE) < 0) {
FILE_OP_ERROR(srcfile, "copy");
g_free(srcfile);
g_free(destfile);
g_warning(_("the src folder is identical to the dest.\n"));
continue;
}
- debug_print(_("Copying message %s%c%d to %s ...\n"),
+ debug_print("Copying message %s%c%d to %s ...\n",
msginfo->folder->path, G_DIR_SEPARATOR,
msginfo->msgnum, dest->path);
if (!destfile) break;
srcfile = procmsg_get_message_file(msginfo);
- if (copy_file(srcfile, destfile) < 0) {
+ if (copy_file(srcfile, destfile, TRUE) < 0) {
FILE_OP_ERROR(srcfile, "copy");
g_free(srcfile);
g_free(destfile);
item->total = n_msg;
}
*/
- debug_print(_("Last number in dir %s = %d\n"), item->path, max);
+ debug_print("Last number in dir %s = %d\n", item->path, max);
item->last_num = max;
return 0;
return NULL;
}
- debug_print(_("\tSearching uncached messages... "));
+ debug_print("\tSearching uncached messages... ");
if (msg_table) {
while ((d = readdir(dp)) != NULL) {
closedir(dp);
if (n_newmsg)
- debug_print(_("%d uncached message(s) found.\n"), n_newmsg);
+ debug_print("%d uncached message(s) found.\n", n_newmsg);
else
- debug_print(_("done.\n"));
+ debug_print("done.\n");
/* sort new messages in numerical order */
if (newlist) {
- debug_print(_("\tSorting uncached messages in numerical order... "));
+ debug_print("\tSorting uncached messages in numerical order... ");
newlist = g_slist_sort
(newlist, (GCompareFunc)procmsg_cmp_msgnum_for_sort);
- debug_print(_("done.\n"));
+ debug_print("done.\n");
}
return newlist;
return msginfo;
}
+#if 0
static gboolean mh_is_maildir_one(const gchar *path, const gchar *dir)
{
gchar *entry;
mh_is_maildir_one(path, "cur") &&
mh_is_maildir_one(path, "tmp");
}
+#endif
static void mh_scan_tree_recursive(FolderItem *item)
{
if (S_ISDIR(s.st_mode)) {
FolderItem *new_item;
+#if 0
if (mh_is_maildir(entry)) {
g_free(entry);
continue;
}
+#endif
new_item = folder_item_new(item->folder, d->d_name, entry);
folder_item_append(item, new_item);