summaryrefslogtreecommitdiffstats
path: root/MDK
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-06-25 02:55:34 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-06-25 02:55:34 +0000
commit9e8102c1e11ec4d6c4c9242793c0f65501c72378 (patch)
tree471975c902923d1927d5512684266bea992f8ed8 /MDK
parent8445fc9a79f6050eafe070e4aec8f89a1274e171 (diff)
downloadperl-MDK-Common-9e8102c1e11ec4d6c4c9242793c0f65501c72378.tar
perl-MDK-Common-9e8102c1e11ec4d6c4c9242793c0f65501c72378.tar.gz
perl-MDK-Common-9e8102c1e11ec4d6c4c9242793c0f65501c72378.tar.bz2
perl-MDK-Common-9e8102c1e11ec4d6c4c9242793c0f65501c72378.tar.xz
perl-MDK-Common-9e8102c1e11ec4d6c4c9242793c0f65501c72378.zip
cp_f and cp_af die if they can't write destination file
Diffstat (limited to 'MDK')
-rw-r--r--MDK/Common/File.pm2
1 files changed, 1 insertions, 1 deletions
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);
}