Restore data folder after processing the imported message

Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
Janos SUTO 2021-08-20 13:41:06 +02:00
parent 01c896e281
commit c2be67aff0

View File

@ -97,7 +97,10 @@ int import_message(struct session_data *sdata, struct data *data, struct config
// When importing emails, we should add the retention value (later) to the original sent value // When importing emails, we should add the retention value (later) to the original sent value
sdata->retained = sdata->sent; sdata->retained = sdata->sent;
// backup original value of data->folder
int folder = data->folder;
rc = process_message(sdata, &state, data, cfg); rc = process_message(sdata, &state, data, cfg);
data->folder = folder;
unlink(state.message_id_hash); unlink(state.message_id_hash);
} }
} }