From 9e8102c1e11ec4d6c4c9242793c0f65501c72378 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Fri, 25 Jun 2004 02:55:34 +0000 Subject: cp_f and cp_af die if they can't write destination file --- MDK/Common/File.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'MDK') diff --git a/MDK/Common/File.pm b/MDK/Common/File.pm index a5f95d3..fbd62b7 100644 --- a/MDK/Common/File.pm +++ b/MDK/Common/File.pm @@ -187,7 +187,7 @@ sub cp_with_option { MDK::Common::System::syscall_('mknod', $dest, $stat[2], $stat[6]) or die "mknod failed (dev $dest): $!"; } else { open(my $F, $src) or die "can't open $src for reading: $!\n"; - open(my $G, "> $dest"); + open(my $G, "> $dest") or die "can't cp to file $dest: !\n"; local $_; while (<$F>) { print $G $_ } chmod((stat($src))[2], $dest); } -- cgit v1.2.1