summaryrefslogtreecommitdiff
path: root/lib/File
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2009-06-04 14:34:57 +0100
committerNicholas Clark <nick@ccl4.org>2009-06-04 14:34:57 +0100
commit1be14c39f70bc8c2f895cdd9147c1c0cc33589df (patch)
tree91f499896be3229dc8f0e5e4675268149ce224aa /lib/File
parentc8be058c40ba584eaa1b32e8b2fe754f679df51d (diff)
downloadperl-1be14c39f70bc8c2f895cdd9147c1c0cc33589df.tar.gz
Correctly interpolate the attempted permissions as octal in the error message.
Diffstat (limited to 'lib/File')
-rwxr-xr-xlib/File/Copy.t6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/File/Copy.t b/lib/File/Copy.t
index cf5b2d9e74..7077a38511 100755
--- a/lib/File/Copy.t
+++ b/lib/File/Copy.t
@@ -291,8 +291,10 @@ SKIP: {
# Slightly convoluted, because some operating systems will let us
# set a directory, but not a file. These should all work:
mkdir $copy1 or die "Can't mkdir $copy1: $!";
- chmod $s_perm, $copy1 or die "Can't chmod %o $copy1: $!", $s_perm;
- rmdir $copy1 or die "Can't rmdir $copy1: $!";
+ chmod $s_perm, $copy1
+ or die sprintf "Can't chmod %o $copy1: $!", $s_perm;
+ rmdir $copy1
+ or die sprintf "Can't rmdir $copy1: $!";
open my $fh0, '>', $copy1 or die "Can't open $copy1: $!";
close $fh0 or die "Can't close $copy1: $!";
unless (chmod $s_perm, $copy1) {