Pom-ng: test return code from File::Copy
PATCH 1/1 Pom-ng: test return code from File::Copy
Hi,
Trying to work out how POM-ng works, I found a slight bug. The returncode from the File::Copy routine is not tested. Attached patch fixes that.
Cheers,
Martijn Lievaart
Netfilter_POM.pm +4 -1
@@ -682,7 +683,10 @@ return 0; } } - File::Copy::copy($srcfile, $destfile); + if (!File::Copy::copy($srcfile, $destfile)) { + $self->{ERRMSG} .= "unable to copy $srcfile to $destfile: $!\n"; + return 0; + } # .foo-test is executable chmod((stat($srcfile))[2] & 07777, $destfile); } else {
Quoted 3 lines · Martijn Lievaart
Trying to work out how POM-ng works, I found a slight bug. The returncode from the
File::Copyroutine is not tested. Attached patch fixes that.
Patch applied, thank you Martijn.
Best regards,
Jozsef
-
E-mail : [email protected], [email protected] PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
Address : KFKI Research Institute for Particle and Nuclear Physics
H-1525 Budapest 114, POB. 49, Hungary