From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer To: development@lists.ipfire.org Subject: [PATCH 2/3] IPsec: Do not interpret $? as error code of move() Date: Tue, 24 Aug 2021 15:50:47 +0000 Message-ID: <20210824155048.13859-2-michael.tremer@ipfire.org> In-Reply-To: <20210824155048.13859-1-michael.tremer@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1149670829016246473==" List-Id: --===============1149670829016246473== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Signed-off-by: Michael Tremer --- html/cgi-bin/vpnmain.cgi | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/html/cgi-bin/vpnmain.cgi b/html/cgi-bin/vpnmain.cgi index 980601ba0..e9064e19c 100644 --- a/html/cgi-bin/vpnmain.cgi +++ b/html/cgi-bin/vpnmain.cgi @@ -2042,9 +2042,8 @@ END unlink ($filename); goto VPNCONF_ERROR; } else { - move($filename, "${General::swroot}/certs/$cgiparams{'NAME'}cert.pem"); - if ($? ne 0) { - $errormessage =3D "$Lang::tr{'certificate file move failed'}: $!"; + unless (move($filename, "${General::swroot}/certs/$cgiparams{'NAME'}cert.= pem")) { + $errormessage =3D "$Lang::tr{'certificate file move failed'} ($filename)= : $!"; unlink ($filename); goto VPNCONF_ERROR; } --=20 2.20.1 --===============1149670829016246473==--