aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog4
-rw-r--r--mail/mail-tools.c39
2 files changed, 27 insertions, 16 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 4159a4a835..d9489a11c7 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -20,6 +20,10 @@
* mail-signature-editor.c: Use gstdio wrappers. Construct UI XML
file pathname at run-time.
+ * mail-tools.c: Use gstdio wrappers. Beautify #include order and
+ syntax.
+ (mail_tool_get_local_movemail_path): Not used, put in #if 0.
+
2005-12-12 Karsten Bräckelmann <guenther@rudersport.de>
* em-folder-view.c: Mail Context Menu re-ordered correctly,
diff --git a/mail/mail-tools.c b/mail/mail-tools.c
index 245bc173cf..13053cd90d 100644
--- a/mail/mail-tools.c
+++ b/mail/mail-tools.c
@@ -22,9 +22,7 @@
* USA
*/
-#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
#include <sys/types.h>
#include <sys/stat.h>
@@ -33,28 +31,32 @@
#include <errno.h>
#include <string.h>
+#include <glib.h>
+#include <glib/gstdio.h>
+
#include <gconf/gconf.h>
#include <gconf/gconf-client.h>
+
#include <libgnome/gnome-i18n.h>
-#include <camel/camel-vee-folder.h>
#include <camel/camel-file-utils.h>
-#include <camel/camel-movemail.h>
#include <camel/camel-mime-message.h>
+#include <camel/camel-movemail.h>
+#include <camel/camel-vee-folder.h>
-#include "em-vfolder-rule.h"
-#include "em-vfolder-context.h"
-#include <filter/filter-option.h>
-#include <filter/filter-input.h>
+#include "filter/filter-option.h"
+#include "filter/filter-input.h"
+#include "em-utils.h"
+#include "em-vfolder-context.h"
+#include "em-vfolder-rule.h"
#include "mail-component.h"
-#include "mail-session.h"
#include "mail-config.h"
-#include "mail-vfolder.h"
-#include "mail-tools.h"
-#include "mail-mt.h"
#include "mail-folder-cache.h"
-#include "em-utils.h"
+#include "mail-mt.h"
+#include "mail-session.h"
+#include "mail-tools.h"
+#include "mail-vfolder.h"
/* **************************************** */
@@ -98,6 +100,9 @@ mail_tool_get_trash (const gchar *url, int connect, CamelException *ex)
return trash;
}
+#if 0
+/* Not used */
+
static char *
mail_tool_get_local_movemail_path (const unsigned char *uri, CamelException *ex)
{
@@ -111,7 +116,7 @@ mail_tool_get_local_movemail_path (const unsigned char *uri, CamelException *ex)
*c = '_';
path = g_strdup_printf("%s/mail/spool", mail_component_peek_base_directory(NULL));
- if (stat(path, &st) == -1 && camel_mkdir(path, 0777) == -1) {
+ if (g_stat(path, &st) == -1 && camel_mkdir(path, 0777) == -1) {
camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM, _("Could not create spool directory `%s': %s"),
path, g_strerror(errno));
g_free(path);
@@ -125,6 +130,8 @@ mail_tool_get_local_movemail_path (const unsigned char *uri, CamelException *ex)
return full;
}
+#endif
+
char *
mail_tool_do_movemail (const char *source_url, CamelException *ex)
{
@@ -155,8 +162,8 @@ mail_tool_do_movemail (const char *source_url, CamelException *ex)
camel_movemail (uri->path, dest_path, ex);
camel_url_free(uri);
- if (stat (dest_path, &sb) < 0 || sb.st_size == 0) {
- unlink (dest_path); /* Clean up the movemail.foo file. */
+ if (g_stat (dest_path, &sb) < 0 || sb.st_size == 0) {
+ g_unlink (dest_path); /* Clean up the movemail.foo file. */
g_free (dest_path);
return NULL;
}