mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-25 07:00:13 +01:00
fix a dry run and remove issue for imap imports
This commit is contained in:
parent
6dcf5fdad7
commit
876f21bec0
@ -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);
|
if(rc == ERR) printf("error importing '%s'\n", filename);
|
||||||
else {
|
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);
|
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);
|
n = write1(sd, buf, strlen(buf), use_ssl, data->ssl);
|
||||||
read_response(sd, buf, sizeof(buf), seq, data, use_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);
|
snprintf(buf, sizeof(buf)-1, "A%d EXPUNGE\r\n", *seq);
|
||||||
n = write1(sd, buf, strlen(buf), use_ssl, data->ssl);
|
n = write1(sd, buf, strlen(buf), use_ssl, data->ssl);
|
||||||
read_response(sd, buf, sizeof(buf), seq, data, use_ssl);
|
read_response(sd, buf, sizeof(buf), seq, data, use_ssl);
|
||||||
|
Loading…
Reference in New Issue
Block a user