diff options
author | Guillaume Rousse <guillomovitch@mandriva.org> | 2007-06-29 22:42:49 +0000 |
---|---|---|
committer | Guillaume Rousse <guillomovitch@mandriva.org> | 2007-06-29 22:42:49 +0000 |
commit | 27e71a3afa6857e3bb864a3ef4575d07e8dbf0e6 (patch) | |
tree | ba5bb16085741d63b75e8b7fc4cb8485ad97c833 | |
parent | ea98a204f1191f393da7c1dd8b884be5a65d0f8e (diff) | |
download | spec-helper-27e71a3afa6857e3bb864a3ef4575d07e8dbf0e6.tar spec-helper-27e71a3afa6857e3bb864a3ef4575d07e8dbf0e6.tar.gz spec-helper-27e71a3afa6857e3bb864a3ef4575d07e8dbf0e6.tar.bz2 spec-helper-27e71a3afa6857e3bb864a3ef4575d07e8dbf0e6.tar.xz spec-helper-27e71a3afa6857e3bb864a3ef4575d07e8dbf0e6.zip |
make sure fix-eol keep original file permissions
-rw-r--r-- | fix-eol | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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); |