Skip empty files to avoid infinite loop
Signed-off-by: Ralph Castain <rhc@open-mpi.org>
Этот коммит содержится в:
родитель
af0b5cffb4
Коммит
a774ea73e4
@ -72,6 +72,12 @@ my $fh;
|
|||||||
# Examine each of the files and remove trailing blank lines
|
# Examine each of the files and remove trailing blank lines
|
||||||
foreach my $f (@files) {
|
foreach my $f (@files) {
|
||||||
quiet_print "==> Working file: $f\n";
|
quiet_print "==> Working file: $f\n";
|
||||||
|
# check file size
|
||||||
|
my $filesize = -s $f;
|
||||||
|
if (0 == $filesize) {
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
|
||||||
open $fh, "+<$f" or die "$!";
|
open $fh, "+<$f" or die "$!";
|
||||||
|
|
||||||
binmode $fh; # Just in case
|
binmode $fh; # Just in case
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user