time_t recv_time;
time_t now;
gint partial_recv;
+ gchar *sanitized_uid = g_strdup(msginfo->account_login);
+ subst_for_filename(sanitized_uid);
+
if (!msginfo->account_server
|| !msginfo->account_login
|| !msginfo->partial_recv)
g_free(path);
path = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S,
"uidl-", msginfo->account_server,
- "-", msginfo->account_login, NULL);
+ "-", sanitized_uid, NULL);
if ((fp = fopen(path, "rb")) == NULL) {
if (ENOENT != errno) FILE_OP_ERROR(path, "fopen");
+ g_free(sanitized_uid);
g_free(path);
return FALSE;
}
}
+ g_free(sanitized_uid);
g_free(path);
now = time(NULL);
int start = TRUE;
gchar partial_recv[POPBUFSIZE];
int err = -1;
-
gchar *filename;
MsgInfo *tinfo;
+ gchar *sanitized_uid = g_strdup(tinfo->account_login);
+
+ subst_for_filename(sanitized_uid);
+
+
filename = procmsg_get_message_file_path(msginfo);
if (!filename) {
g_warning("can't get message file path.\n");
}
path = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S,
"uidl", G_DIR_SEPARATOR_S, tinfo->account_server,
- "-", tinfo->account_login, NULL);
+ "-", sanitized_uid, NULL);
+
if ((fp = fopen(path, "rb")) == NULL) {
perror("fopen1");
if (ENOENT != errno) FILE_OP_ERROR(path, "fopen");
pathnew = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S,
"uidl", G_DIR_SEPARATOR_S, tinfo->account_server,
- "-", tinfo->account_login, ".new", NULL);
+ "-", sanitized_uid, ".new", NULL);
+
+ g_free(sanitized_uid);
+
if ((fpnew = fopen(pathnew, "wb")) == NULL) {
perror("fopen2");
fclose(fp);
time_t recv_time;
time_t now;
gint partial_recv;
-
+ gchar *sanitized_uid = g_strdup(login);
+
+ subst_for_filename(sanitized_uid);
+
path = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S,
"uidl", G_DIR_SEPARATOR_S,
- server, "-", login, NULL);
+ server, "-", sanitized_uid, NULL);
if ((fp = fopen(path, "rb")) == NULL) {
if (ENOENT != errno) FILE_OP_ERROR(path, "fopen");
g_free(path);
path = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S,
"uidl-", server,
- "-", login, NULL);
+ "-", sanitized_uid, NULL);
if ((fp = fopen(path, "rb")) == NULL) {
if (ENOENT != errno) FILE_OP_ERROR(path, "fopen");
+ g_free(sanitized_uid);
g_free(path);
return result;
}
}
+ g_free(sanitized_uid);
g_free(path);
now = time(NULL);
time_t recv_time;
time_t now;
gint partial_recv;
+ gchar *sanitized_uid = g_strdup(ac_prefs->userid);
+
+ subst_for_filename(sanitized_uid);
table = g_hash_table_new(g_str_hash, g_str_equal);
partial_recv_table = g_hash_table_new(g_str_hash, g_str_equal);
path = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S,
"uidl", G_DIR_SEPARATOR_S, ac_prefs->recv_server,
- "-", ac_prefs->userid, NULL);
+ "-", sanitized_uid, NULL);
+
+ g_free(sanitized_uid);
if ((fp = fopen(path, "rb")) == NULL) {
if (ENOENT != errno) FILE_OP_ERROR(path, "fopen");
g_free(path);
FILE *fp;
Pop3MsgInfo *msg;
gint n;
+ gchar *sanitized_uid = g_strdup(session->ac_prefs->userid);
+
+ subst_for_filename(sanitized_uid);
+
if (!session->uidl_is_valid) return 0;
path = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S,
"uidl", G_DIR_SEPARATOR_S,
session->ac_prefs->recv_server,
- "-", session->ac_prefs->userid, NULL);
+ "-", sanitized_uid, NULL);
+
+ g_free(sanitized_uid);
+
if ((fp = fopen(path, "wb")) == NULL) {
FILE_OP_ERROR(path, "fopen");
g_free(path);