@@ -1277,16 +1277,15 @@ fn install_certificate_files(
12771277 if let Err ( error) =
12781278 rename_certificate_file ( & directory, & key_tmp, & paths. key_path , directory_fd)
12791279 {
1280- if cert_backed_up {
1281- if let Err ( restore_error) =
1280+ if cert_backed_up
1281+ && let Err ( restore_error) =
12821282 restore_backup ( & directory, & cert_backup, & paths. cert_path , directory_fd)
1283- {
1284- log_acme_certificate_recovery_error (
1285- "restoring previous certificate after private-key install failure" ,
1286- & paths. cert_path ,
1287- & restore_error,
1288- ) ;
1289- }
1283+ {
1284+ log_acme_certificate_recovery_error (
1285+ "restoring previous certificate after private-key install failure" ,
1286+ & paths. cert_path ,
1287+ & restore_error,
1288+ ) ;
12901289 }
12911290 return Err ( error) ;
12921291 }
@@ -1311,27 +1310,25 @@ fn install_certificate_files(
13111310 & error,
13121311 ) ;
13131312 }
1314- if cert_backed_up {
1315- if let Err ( error) =
1313+ if cert_backed_up
1314+ && let Err ( error) =
13161315 restore_backup ( & directory, & cert_backup, & paths. cert_path , directory_fd)
1317- {
1318- log_acme_certificate_recovery_error (
1319- "restoring previous certificate" ,
1320- & paths. cert_path ,
1321- & error,
1322- ) ;
1323- }
1316+ {
1317+ log_acme_certificate_recovery_error (
1318+ "restoring previous certificate" ,
1319+ & paths. cert_path ,
1320+ & error,
1321+ ) ;
13241322 }
1325- if key_backed_up {
1326- if let Err ( error) =
1323+ if key_backed_up
1324+ && let Err ( error) =
13271325 restore_backup ( & directory, & key_backup, & paths. key_path , directory_fd)
1328- {
1329- log_acme_certificate_recovery_error (
1330- "restoring previous private key" ,
1331- & paths. key_path ,
1332- & error,
1333- ) ;
1334- }
1326+ {
1327+ log_acme_certificate_recovery_error (
1328+ "restoring previous private key" ,
1329+ & paths. key_path ,
1330+ & error,
1331+ ) ;
13351332 }
13361333 }
13371334
0 commit comments