From: Nicholas Clark Date: Thu, 4 Jun 2009 13:34:57 +0000 (+0100) Subject: Correctly interpolate the attempted permissions as octal in the error message. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1be14c39f70bc8c2f895cdd9147c1c0cc33589df;p=p5sagit%2Fp5-mst-13.2.git Correctly interpolate the attempted permissions as octal in the error message. --- diff --git a/lib/File/Copy.t b/lib/File/Copy.t index cf5b2d9..7077a38 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) {