fix a dry run and remove issue for imap imports

This commit is contained in:
SJ 2015-09-03 14:42:49 +02:00
parent 6dcf5fdad7
commit 876f21bec0

View File

@ -248,7 +248,7 @@ int process_imap_folder(int sd, int *seq, char *folder, struct session_data *sda
if(rc == ERR) printf("error importing '%s'\n", filename);
else {
if(data->import->remove_after_import == 1){
if(data->import->remove_after_import == 1 && dryrun == 0){
snprintf(buf, sizeof(buf)-1, "A%d STORE %d +FLAGS.SILENT (\\Deleted)\r\n", *seq, i);
n = write1(sd, buf, strlen(buf), use_ssl, data->ssl);
read_response(sd, buf, sizeof(buf), seq, data, use_ssl);
@ -260,7 +260,7 @@ int process_imap_folder(int sd, int *seq, char *folder, struct session_data *sda
}
if(data->import->remove_after_import == 1){
if(data->import->remove_after_import == 1 && dryrun == 0){
snprintf(buf, sizeof(buf)-1, "A%d EXPUNGE\r\n", *seq);
n = write1(sd, buf, strlen(buf), use_ssl, data->ssl);
read_response(sd, buf, sizeof(buf), seq, data, use_ssl);