1
1

Merge pull request #3043 from rhc54/topic/purge

Skip empty files to avoid infinite loop
Этот коммит содержится в:
Ralph Castain 2017-02-27 06:03:54 -08:00 коммит произвёл GitHub
родитель af0b5cffb4 a774ea73e4
Коммит feed472ea5

Просмотреть файл

@ -72,6 +72,12 @@ my $fh;
# Examine each of the files and remove trailing blank lines
foreach my $f (@files) {
quiet_print "==> Working file: $f\n";
# check file size
my $filesize = -s $f;
if (0 == $filesize) {
next;
}
open $fh, "+<$f" or die "$!";
binmode $fh; # Just in case