diff --git a/contrib/purge-tab-indents.pl b/contrib/purge-tab-indents.pl index 7e576f41993..e2900fbc1fd 100755 --- a/contrib/purge-tab-indents.pl +++ b/contrib/purge-tab-indents.pl @@ -83,6 +83,10 @@ sub quiet_print { quiet_print "FILE: $f\n"; + my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size, + $atime,$mtime,$ctime,$blksize,$blocks) + = stat($f); + open(FILE, "$f"); my @lines_with_tabs = ; close(FILE); @@ -92,6 +96,7 @@ sub quiet_print { print TEMP @expanded_lines; close(TEMP); system("mv temp.txt $f"); + chmod($mode, $f); } # Returns a list of file names (relative to pwd) which the VCS considers to be modified. @@ -157,7 +162,6 @@ sub find_modified_files { my $relname = $fullname; $relname =~ s!^([^/]*/){$n_strip}!!g; - print "RELNAME", $relname, "\n"; push @files, $relname if (-f $relname); }