All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Pom-ng: test return code from File::Copy
@ 2004-05-05 19:34 Martijn Lievaart
  2004-05-06 14:32 ` Jozsef Kadlecsik
  0 siblings, 1 reply; 2+ messages in thread
From: Martijn Lievaart @ 2004-05-05 19:34 UTC (permalink / raw)
  To: Netfilter Developers List

[-- Attachment #1: Type: text/plain, Size: 178 bytes --]

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


[-- Attachment #2: file_copy_patch --]
[-- Type: text/plain, Size: 490 bytes --]

--- patch-o-matic-ng/Netfilter_POM.pm	2004-05-05 12:24:04.000000000 +0200
+++ patch-o-matic-ng.new/Netfilter_POM.pm	2004-05-05 18:49:26.000000000 +0200
@@ -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 {

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-05-06 14:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-05 19:34 [PATCH] Pom-ng: test return code from File::Copy Martijn Lievaart
2004-05-06 14:32 ` Jozsef Kadlecsik

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.