Skip to content

Commit

Permalink
send-email: use lexical filehandle for opendir
Browse files Browse the repository at this point in the history
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.comReviewed-by: Avery Pennarun <apenwarr@gmail.com>
Reviewed-by: Jeff King <peff@peff.net>
>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Ævar Arnfjörð Bjarmason authored and Junio C Hamano committed Sep 30, 2010
1 parent 9855b08 commit c603816
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions git-send-email.perl
Original file line number Diff line number Diff line change
Expand Up @@ -512,12 +512,12 @@ ($)
push @rev_list_opts, "--", @ARGV;
@ARGV = ();
} elsif (-d $f and !check_file_rev_conflict($f)) {
opendir(DH,$f)
opendir my $dh, $f
or die "Failed to opendir $f: $!";

push @files, grep { -f $_ } map { catfile($f, $_) }
sort readdir(DH);
closedir(DH);
sort readdir $dh;
closedir $dh;
} elsif ((-f $f or -p $f) and !check_file_rev_conflict($f)) {
push @files, $f;
} else {
Expand Down

0 comments on commit c603816

Please sign in to comment.