Permalink
Browse files

get and set mode on tar contents

  • Loading branch information...
1 parent acf5309 commit 8898feff890e667359e5ddecf7b714a12f29954a @rjbs committed Jul 15, 2011
Showing with 4 additions and 7 deletions.
  1. +1 −0 Changes
  2. 0 bin/dzil
  3. +3 −7 lib/Dist/Zilla/Dist/Builder.pm
View
@@ -1,6 +1,7 @@
Revision history for {{$dist->name}}
{{$NEXT}}
+ move the file mode setting into the tar creation, not a fixup step
4.200010 2011-07-14 22:27:46 America/New_York
fix [rt.cpan.org #68223] -- Test::Dzil built tarballs with bad root
View
0 bin/dzil 100644 → 100755
No changes.
@@ -402,23 +402,19 @@ sub build_archive {
)
}
+ my $filename = $built_in->file( $distfile->name );
$archive->add_data(
$basedir->file( $distfile->name ),
do {
use autodie;
local $/;
- open my $fh, '<', $built_in->file( $distfile->name );
+ open my $fh, '<', $filename;
<$fh>;
},
+ { mode => (stat $filename)[2] & ~022 },
);
}
- # Fix up the CHMOD on the archived files, to inhibit 'withoutworldwritables'
- # behaviour on win32.
- for my $f ( $archive->get_files ) {
- $f->mode( $f->mode & ~022 );
- }
-
my $file = file("$basename.tar.gz");
$self->log("writing archive to $file");

0 comments on commit 8898fef

Please sign in to comment.