aboutsummaryrefslogtreecommitdiffstats
path: root/fix-eol
diff options
context:
space:
mode:
Diffstat (limited to 'fix-eol')
-rw-r--r--fix-eol3
1 files changed, 3 insertions, 0 deletions
diff --git a/fix-eol b/fix-eol
index 7d3bf21..15d1b0f 100644
--- a/fix-eol
+++ b/fix-eol
@@ -40,7 +40,10 @@ sub convert {
my $tmp = $out->filename;
$out = undef;
+ # rename file, taking care to keep original permissions
+ my $perms = (stat $_)[2] & 07777;
rename($tmp, $_) or die "Unable to rename $tmp to $_: $!";
+ chmod($perms, $_);
}
close($in);