/*
* Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2007 Colin Leroy <colin@colino.net>
+ * Copyright (C) 1999-2012 Colin Leroy <colin@colino.net>
* and the Claws Mail team
*
* This program is free software; you can redistribute it and/or modify
#ifdef HAVE_CONFIG_H
# include "config.h"
+#include "claws-features.h"
#endif
#include <glib.h>
gchar uidl[POPBUFSIZE];
time_t recv_time;
time_t now;
- gint partial_recv;
gchar *sanitized_uid = NULL;
if (!msginfo->extradata)
gchar tmp[POPBUFSIZE];
strretchomp(buf);
recv_time = RECV_TIME_NONE;
- partial_recv = POP3_TOTALLY_RECEIVED;
if (sscanf(buf, "%s\t%ld\t%s", uidl, (long int *) &recv_time,
tmp) < 2) {
filename = procmsg_get_message_file_path(msginfo);
if (!filename) {
- g_warning("can't get message file path.\n");
+ g_warning("can't get message file path.");
return err;
}
tinfo = procheader_parse_file(filename, msginfo->flags, TRUE, TRUE);
}
fclose(fp);
- claws_unlink(filename);
- g_rename(pathnew, filename);
+ if (rename_force(pathnew, filename) != 0) {
+ g_free(pathnew);
+ goto bail;
+ }
+
g_free(pathnew);
msginfo->planned_download = download;
msgcache_update_msg(msginfo->folder->cache, msginfo);
err = 0;
bail:
g_free(filename);
- procmsg_msginfo_free(tinfo);
+ procmsg_msginfo_free(&tinfo);
return err;
}
gchar uidl[POPBUFSIZE];
time_t recv_time;
time_t now;
- gint partial_recv;
gchar *sanitized_uid = g_strdup(login);
subst_for_filename(sanitized_uid);
gchar tmp[POPBUFSIZE];
strretchomp(buf);
recv_time = RECV_TIME_NONE;
- partial_recv = POP3_TOTALLY_RECEIVED;
if (sscanf(buf, "%s\t%ld\t%s", uidl, (long int *) &recv_time,
tmp) < 2) {