/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2012 Hiroyuki Yamamoto and the Claws Mail team
+ * Copyright (C) 1999-2013 Hiroyuki Yamamoto and the Claws Mail team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
#include <time.h>
#include "folder.h"
+#include "folder_item_prefs.h"
#include "mh.h"
#include "procmsg.h"
#include "procheader.h"
mh_class.type = F_MH;
mh_class.idstr = "mh";
mh_class.uistr = "MH";
+ mh_class.supports_server_search = FALSE;
/* Folder functions */
mh_class.new_folder = mh_folder_new;
mh_class.add_msgs = mh_add_msgs;
mh_class.copy_msg = mh_copy_msg;
mh_class.copy_msgs = mh_copy_msgs;
+ mh_class.search_msgs = folder_item_search_msgs_local;
mh_class.remove_msg = mh_remove_msg;
mh_class.remove_msgs = mh_remove_msgs;
mh_class.remove_all_msg = mh_remove_all_msg;
FolderItem *src = NULL;
gchar *srcfile;
gchar *destfile;
- gint filemode = 0;
FolderItemPrefs *prefs;
MsgInfo *msginfo = NULL;
MsgInfoList *cur = NULL;
if (prefs && prefs->enable_folder_chmod && prefs->folder_chmod) {
if (chmod(destfile, prefs->folder_chmod) < 0)
FILE_OP_ERROR(destfile, "chmod");
-
- /* for mark file */
- filemode = prefs->folder_chmod;
- if (filemode & S_IRGRP) filemode |= S_IWGRP;
- if (filemode & S_IROTH) filemode |= S_IWOTH;
}
if (relation) {
if (g_hash_table_lookup(relation, msginfo) != NULL)
if (!is_dir_exist(real_path) && is_dir_exist(path)) {
/* mmh, older version did put utf8 filenames instead of
* the correct encoding */
- g_rename(path, real_path);
- folder_item_scan(item);
+ if (g_rename(path, real_path) == 0)
+ folder_item_scan(item);
}
g_free(path);
entry = mh_filename_from_utf8(utf8entry);
if (
-#if !defined(G_OS_WIN32) && !defined(MAEMO) && defined(HAVE_DIRENT_D_TYPE)
+#if !defined(G_OS_WIN32) && defined(HAVE_DIRENT_D_TYPE)
d->d_type == DT_DIR ||
(d->d_type == DT_UNKNOWN &&
#endif
g_stat(entry, &s) == 0 && S_ISDIR(s.st_mode)
-#if !defined(G_OS_WIN32) && !defined(MAEMO) && defined(HAVE_DIRENT_D_TYPE)
+#if !defined(G_OS_WIN32) && defined(HAVE_DIRENT_D_TYPE)
)
#endif
) {
if (fclose(mh_sequences_new_fp) == EOF)
err = TRUE;
- if (!err)
- g_rename(mh_sequences_new, mh_sequences_old);
+ if (!err) {
+ if (g_rename(mh_sequences_new, mh_sequences_old) < 0)
+ FILE_OP_ERROR(mh_sequences_new, "rename");
+ }
g_free(sequence);
procmsg_msg_list_free(msglist);
}