This commit is contained in:
Simon Laux
2019-08-08 01:09:41 +02:00
parent 4f1a25e1bf
commit cf49acff67

View File

@@ -508,7 +508,7 @@ pub unsafe fn dc_normalize_setup_code(
#[allow(non_snake_case)] #[allow(non_snake_case)]
pub unsafe fn dc_job_do_DC_JOB_IMEX_IMAP(context: &Context, job: *mut dc_job_t) { pub unsafe fn dc_job_do_DC_JOB_IMEX_IMAP(context: &Context, job: *mut dc_job_t) {
let mut ok_to_continue1 = true; let mut ok_to_continue = true;
let mut success: libc::c_int = 0; let mut success: libc::c_int = 0;
let mut ongoing_allocated_here: libc::c_int = 0; let mut ongoing_allocated_here: libc::c_int = 0;
let what: libc::c_int; let what: libc::c_int;
@@ -536,37 +536,33 @@ pub unsafe fn dc_job_do_DC_JOB_IMEX_IMAP(context: &Context, job: *mut dc_job_t)
0, 0,
"Import/export: Cannot create private key or private key not available.", "Import/export: Cannot create private key or private key not available.",
); );
ok_to_continue1 = false; ok_to_continue = false;
} else { } else {
dc_create_folder(context, &param1_s); dc_create_folder(context, &param1_s);
} }
} }
if ok_to_continue1 { if ok_to_continue {
match what { match what {
1 => { 1 => {
if 0 == export_self_keys(context, param1.as_ptr()) { if 0 != export_self_keys(context, param1.as_ptr()) {
} else {
info!(context, 0, "Import/export completed.",); info!(context, 0, "Import/export completed.",);
success = 1 success = 1
} }
} }
2 => { 2 => {
if 0 == import_self_keys(context, param1.as_ptr()) { if 0 != import_self_keys(context, param1.as_ptr()) {
} else {
info!(context, 0, "Import/export completed.",); info!(context, 0, "Import/export completed.",);
success = 1 success = 1
} }
} }
11 => { 11 => {
if 0 == export_backup(context, param1.as_ptr()) { if 0 != export_backup(context, param1.as_ptr()) {
} else {
info!(context, 0, "Import/export completed.",); info!(context, 0, "Import/export completed.",);
success = 1 success = 1
} }
} }
12 => { 12 => {
if 0 == import_backup(context, param1.as_ptr()) { if 0 != import_backup(context, param1.as_ptr()) {
} else {
info!(context, 0, "Import/export completed.",); info!(context, 0, "Import/export completed.",);
success = 1 success = 1
} }